Issue
I've try to use code from this question: How to detect `focusin` support?
but for Chromium that supports offline
event hasEvent('offline')
return false. Anybody know how to detect offline/online events in JavaScript?
Solution
It seems that online and offline events start on body and bubble up so you can't use div to detect it. But I've created this code:
var body = document.getElementsByTagName('body')[0];
body.setAttribute('ononline', 'return;')
typeof body.ononline == 'function';
Answered By - jcubic
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.