SKLn-Rad / Xam.Plugin.Webview

Xamarin Plugin for a HybridWebView in PCL projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

navigator.onLine does not work

flecce opened this issue · comments

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

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).