Results 1 - 3 of 3


The DedicatedWorkerGlobalScope object (the Worker global scope) is accessible through the self keyword. Some additional global functions, namespaces objects, and constructors, not typically associated with the worker global scope, but available on it, are listed in the JavaScript Reference. See also: Functions available to workers.
API DedicatedWorkerGlobalScope Interface NeedsBrowserCompatibility Reference Référence Web Workers Workers


The onmessage property of the DedicatedWorkerGlobalScope interface represents an EventHandler to be called when the message event occurs and bubbles through the Worker — i.e. when a message is sent to the worker using the Worker.postMessage method.
API DedicatedWorkerGlobalScope onmessage Property Reference Référence Web Workers


The postMessage() method of the DedicatedWorkerGlobalScope interface sends a message to the main thread that spawned it. This accepts a single parameter, which is the data to send to the worker. The data may be any value or JavaScript object handled by the structured clone algorithm, which includes cyclical references.
API DedicatedWorkerGlobalScope Method postMessage Reference Référence Web Workers