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
fun postMessage(message: ERROR CLASS: Symbol not found for JsAny??, transfer: ReadonlyArray<Transferable>)
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.
fun postMessage(message: ERROR CLASS: Symbol not found for JsAny??, options: StructuredSerializeOptions = definedExternally)
Link copied to clipboard