javascript - Check online or offline? -


what easiest way trigger function when device becomes online or offline android webview.i found one.

window.addeventlistener('online', update onlinestatus);

but not working in android webview

do whatever want in callback there alert when connection lost

document.addeventlistener("offline", function(){ alert("no connection found") }, false); 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -