Functions and classes available to Web Workers

In addition to the standard JavaScript set of functions (such as String, Array, Object, JSON, etc.), there are a variety of functions available from the DOM to workers. This article provides a list of those.

Worker Contexts & Functions

Workers run in a different global context than the current window! While Window is not directly available to workers, many of the same methods are defined in a shared mixin (WindowOrWorkerGlobalScope), and made available to workers through their own WorkerGlobalScope-derived contexts:

Some of the functions (a subset) that are common to all workers and to the main thread (from WindowOrWorkerGlobalScope) are:

The following functions are only available to workers:

Web APIs available in workers

See also