WorkerGlobalScope : Global
The following are properties of the global object when running inside a Worker background process. They can be accessed from anywhere without additional qualifiers.
Instance Properties
globalThis : WorkerGlobalScope
self : WorkerGlobalScope
Returns the global object itself. This is the same as globalThis (in a Worker context).
Example:
RunResults:
Instance Events
onerror / 'error'
Fired when there is an error in the worker. See also reportError().
Example:
RunResults:
Called when Worker.postMessage()
is called. event.data
contains the message passed to postMessage()
.
Example:
RunResults:
Copyright © JavaScripture Contributors