Methods

This section describes the methods associated with the Web Workers API.

In this section

TopicDescription

sendBeacon

Provides an asynchronous and non-blocking way to transmit data to a provided URL.

clearInterval

Clears an interval created by the setInterval method.

clearTimeout

Clears an interval set by the setInterval method.

close

Stops a worker when called inside worker code.

importScripts

Loads and executes one or more scripts into the worker specified by a URL.

postMessage

Sends a message from the worker to the parent thread.

setInterval

Calls a specified function at specified intervals in milliseconds.

setTimeout

Calls a specified function after a specified number of milliseconds.

terminate

Terminates a worker thread immediately.

 

 

 

Show: