WorkerGlobalScope.ononline
The ononline
property of the WorkerGlobalScope
interface represents an event handler to be called when the online
event occurs.
Syntax
self.ononline = function() { ... };
Example
The following code snippet shows an ononline
handler set inside a worker:
self.ononline = function() { console.log('Your worker is now online'); }
Specifications
Specification |
---|
HTML Standard (HTML) # handler-workerglobalscope-ononline |
Browser compatibility
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 |
See also
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