WorkerGlobalScope
Global object available inside every JSplitter Worker.
Global object available inside every JSplitter Worker.
name: string = ""
Immutable Worker identity supplied through the Worker constructor. The value is fixed for the Worker's lifetime. JSplitter reports the same name in window.JsMemoryStats and in unhandled Worker exception diagnostics. If no name was supplied this value is an empty string; diagnostics display it as <unnamed>.
onerror: ?WorkerErrorCallback = null
Global error handler for uncaught Worker task exceptions. The callback receives an ErrorEvent with the error text and Worker source location. When this handler or a Worker-global error listener is installed, the error is handled locally and is not forwarded to the parent Worker.
onmessage: ?WorkerMessageCallback = null
Receives messages sent by the parent through Worker.postMessage().
onmessageerror: ?WorkerMessageCallback = null
Receives a MessageEvent when a serialized parent message cannot be reconstructed by the Worker. errorMessage contains the reconstruction failure and direction is panel-to-worker.
onrejectionhandled: ?WorkerPromiseRejectionCallback = null
Handler for Promise rejections that later become handled.
onunhandledrejection: ?WorkerPromiseRejectionCallback = null
Handler for newly unhandled Promise rejections.
performance: Object
Worker-local performance timeline.
self: WorkerGlobalScope
The Worker global object itself.
close()
Requests Worker shutdown from inside the Worker after the current task completes. Use this when Worker code itself knows that no more event-loop work is needed.
postMessage(data, transfer)
Serializes and sends a value from the Worker to its parent.
| Name | Type | Description |
|---|---|---|
data | * | Value to send. |
transferoptional | (Array<*>|Object) | Transfer list, either directly as an array or as an object containing |