Returns a promise that, when resolved, indicates when the WorkerSelfWrapper is ready to be used.
Returns the underlying WorkerGlobalScope or MessagePort for the platform.
Minimum viable API to provide the browser's addEventListener API
for all platforms.
The event to subscribe to.
Event handler function
Initializes the underlying messaging system for the platform.
Minimum viable API to provide node's off API
for all platforms.
The event to unsubscribe from
Event handler function that was registered using either on or addEventListener
Minimum viable API to provide node's on API
for all platforms.
The event to subscribe to.
Event handler function
Posts a message to the code owner of this worker thread, this is meant to be homogeneous across platforms.
The message to send to the worker, can be anything that is supported by the structured clone algorithm
Objects to transfer to the worker, limited to ArrayBuffer objects as a minimum viable
API on all platforms.
Minimum viable API to provide the browser's removeEventListener API
for all platforms.
The event to unsubscribe from
Event handler function that was registered using either on or addEventListener
Generated using TypeDoc
Wrapper for the WorkerGlobalScope in the browser/deno and MessagePort in NodeJS.
This class is not meant to be used directly, instead, the
WorkerSelfmodule exports a single instance of this class.