The namespace includes Worker, MessageChannel, MessagePort,
BroadcastChannel, thread metadata, environment data, and transfer markers.
| Export | Purpose |
|---|---|
Worker | Construct a worker from a file or evaluated source. |
isMainThread, isInternalThread, threadId | Identify the current thread. |
parentPort, workerData | Communicate with a parent worker. |
MessageChannel, MessagePort, BroadcastChannel | Messaging primitives. |
getEnvironmentData(), setEnvironmentData() | Worker environment data. |
receiveMessageOnPort() | Read a queued port message synchronously. |
| transfer-marker functions | Control cloning and transfer. |
SHARE_ENV, resourceLimits | Worker configuration values. |
Heap snapshots, port-to-context movement, and direct thread posting are not complete.
In 1.5, a new worker does not keep
elide runalive. A standalone script can exit before worker event handlers run. Do not rely onWorkerfor standalone background work until lifecycle integration is complete.
For same-realm channels, see Web Messaging.