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

EventTarget

EventTarget: object

Type declaration

  • constructor: function
    • Returns EventTarget

  • prototype: EventTarget

onerror

onerror: function | null

onmessage

onmessage: function | null

Methods

addEventListener

dispatchEvent

  • dispatchEvent(event: Event): boolean
  • 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

postMessage

  • Parameters

    Returns void

  • Parameters

    Returns void

removeEventListener

terminate

  • terminate(): void
  • Returns void

Generated using TypeDoc