navigator.onLine does not work
flecce opened this issue · comments
Fabiano Lecce commented
Hi,
the navigator.onLine statement does not work.
Also the event listener on connection status does not work.
window.addEventListener('online', () => { alert(true); });
window.addEventListener('offline', () => { alert(false); });
Do you know the issue?
Thanks in advance
Bye
Vinicius Dutra commented
It's apper that you are misunderstood of these events:
https://developer.mozilla.org/pt-BR/docs/Web/API/NavigatorOnLine/Online_and_offline_events
Offiline:
This property is updated when the user enters "Offline Mode" by clicking on the corresponding menu item (File -> Offline Mode).