ServiceWorkerGlobalScope
interface is called whenever incoming messages are received.onmessage
event handler of the MessagePort
interface is an EventListener
, called whenever an MessageEvent
of type message
is fired on the port — that is, when the port receives a message.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.onmessage
property of the Worker
interface represents an EventHandler
, that is a function to be called when the message
event occurs. These events are of type MessageEvent
and will be called when the worker's parent receives a message (i.e. from the DedicatedWorkerGlobalScope.postMessage
method.