Reputation:
I Want To Know Is It Possible That Use From window.addEventListener('online', function(e) { console.log('online'); });
In Workers? I Need Somthing Like This That Notify Network Connection To Users.
Upvotes: 1
Views: 61
Reputation: 11
Every eventListener should have a event this wants the interface corresponds to the event..eg:if you want key to perform some action .then first of all key listener should registered with the key and if any key pressed then key event asks keylistener(interface)taking key event event as argument and performs to print certain a msg..
Upvotes: 1
Reputation: 1531
might help
window.navigator.onLine
https://developer.mozilla.org/en-US/docs/Web/API/NavigatorOnLine/onLine
Upvotes: 0