class Worker
extends EventTarget
import { Worker } from "https://deno.land/x/xdg@v10.5.1/vendor/types/deno.d.ts";
Constructors
new
Worker(specifier: string, options?: WorkerOptions)Properties
optional
onerror: (e: ErrorEvent) => voidoptional
onmessage: (e: MessageEvent) => voidoptional
onmessageerror: (e: MessageEvent) => voidMethods
addEventListener<K extends keyof WorkerEventMap>(): void
type: K,
listener: (this: Worker, ev: WorkerEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
addEventListener(): void
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
postMessage(message: any, transfer: ArrayBuffer[]): void
postMessage(message: any, options?: PostMessageOptions): void
removeEventListener<K extends keyof WorkerEventMap>(): void
type: K,
listener: (this: Worker, ev: WorkerEventMap[K]) => any,
options?: boolean | EventListenerOptions,
removeEventListener(): void
terminate(): void