Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

Index

Properties

onerror: (this: AbstractWorker, ev: External.ErrorEvent) => any

Type declaration

onmessage: (this: External.Worker, ev: MessageEvent<any>) => any

Type declaration

onmessageerror: (this: External.Worker, ev: MessageEvent<any>) => any

Type declaration

Methods

  • Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

    Parameters

    Returns boolean

  • Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned.

    Parameters

    Returns void

  • Parameters

    Returns void

  • terminate(): void
  • Aborts worker's associated global environment.

    Returns void

Generated using TypeDoc