Worker : EventTarget
Worker allows a page to run Javascript on a background thread so the main UI thread can remain responsive. Workers do not have access to the DOM or any global variables in the main UI thread and must use the
postMessage()
method to communicate with the main thread. See WorkerGlobalScope for the global properties and methods available inside the worker.Instance Events
Fires when the worker calls postMessage()
. The message passed to postMessage
is in event.data
.
Example:
RunResults:
Copyright © JavaScripture Contributors