import { type Worker } from "https://deno.land/x/evt@v2.5.3/lib/types/lib.dom.ts";
This Web Workers API interface represents a background task that can be easily created and can send messages back to its creator. Creating a worker is as simple as calling the Worker() constructor and specifying a script to be run in the worker thread.
Properties
onmessage: ((this: Worker, ev: MessageEvent) => any) | null
Methods
postMessage(message: any, transfer: Transferable[]): void
postMessage(message: any, options?: PostMessageOptions): void
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,
removeEventListener<K extends keyof WorkerEventMap>(): void
type: K,
listener: (this: Worker, ev: WorkerEventMap[K]) => any,
options?: boolean | EventListenerOptions,