Hullo JS
Search…
onLine
import { onLine } from '@hullo/browser'
An observable of boolean values where true is sent if browser reports working internet connection and false if it does not.
1
import { onLine } from '@hullo/browser';
2
​
3
onLine().subscribe({
4
next(online) {
5
console.log(online ? "online" : "offline");
6
}
7
});
Copied!
Last modified 2yr ago
Copy link