Interface

Worker

Worker

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.

View Source js/lib.dom.d.ts, line 7019

Members

void

# postMessage

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.

View Source js/lib.dom.d.ts, line 7022

void

# terminate

Aborts worker's associated global environment.

View Source js/lib.dom.d.ts, line 7027