Worker
open class Worker(scriptURL: TrustedScriptURL, options: WorkerOptions = definedExternally) : EventTarget, AbstractWorker, MessageEventTarget(source)
The Worker interface of the Web Workers API represents a background task that can be created via script, which can send messages back to its creator.
Functions
Link copied to clipboard
Link copied to clipboard
The postMessage() method of the Worker interface sends a message to the worker. The first parameter is the data to send to the worker. The data may be any JavaScript object that can be handled by the structured clone algorithm.
Link copied to clipboard