The ononline
property of the WorkerGlobalScope
interface represents an event handler to be called when the online
event occurs.
self.ononline = function() { ... };
The following code snippet shows an ononline
handler set inside a worker:
self.ononline = function() { console.log('Your worker is now online'); }
Specification |
---|
HTML Standard (HTML) # handler-workerglobalscope-ononline |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
ononline |
4 |
≤79 |
29 |
No |
? |
8 |
40 |
40 |
29 |
? |
8 |
4.0 |
The WorkerGlobalScope
interface it belongs to.
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/ononline