variable Worker
interface Worker
extends EventTarget
Properties
🔗
onerror: (e: ErrorEvent) => void
🔗
onmessage: (e: MessageEvent) => void
🔗
onmessageerror: (e: MessageEvent) => void
Methods
🔗
postMessage(message: any, transfer: Transferable[]): void
🔗
postMessage(message: any, options?: StructuredSerializeOptions): void
🔗
addEventListenerType Parameters
🔗
K extends keyof WorkerEventMap
(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void
🔗
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void
🔗
removeEventListenerType Parameters
🔗
K extends keyof WorkerEventMap
(type: K, listener: (this: Worker, ev: WorkerEventMap[K]) => any, options?: boolean | EventListenerOptions): void
🔗
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void
🔗
terminate(): void