Function: onOnline()
ts
function onOnline(callback): () => void;Registers a callback for when the browser comes back online and returns an unsubscribe function.
Parameters
| Parameter | Type |
|---|---|
callback | () => void |
Returns
() => void
Example
ts
const off = onOnline(() => console.log('back online'))
off()Since
1.0.0