Warn your users when their network goes down. Make sure they don't lose anything.
Notify your users when their network goes down. Make sure they don't lose anything.
NPM: heyoffline
import Heyoffline from "./dist/heyoffline.esm.js"
new Heyoffline()
UNPKG: https://unpkg.com/heyoffline@latest/dist/heyoffline.umd.js
<script src="dist/heyoffline.umd.js"></script>
new Heyoffline({
monitorFields: true,
fields: ".monitoredFields"
});
Heyoffline is framework-agnostic vanilla JS.
All efforts have been made to keep the source as clean and readable as possible.
Heyoffline.js is released under an MIT License, so do with it what you will.