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

BCD tables only load in the browser

See also

The WorkerGlobalScope interface it belongs to.