postMessage
The postMessage() method of the DedicatedWorkerGlobalScope interface sends a message to the main thread that spawned it.
The postMessage() method of the DedicatedWorkerGlobalScope interface sends a message to the main thread that spawned it.