In addition to the standard JavaScript set of functions (such as String, Array, Object, JSON, etc.), there are a variety of functions (and APIs) available in the workers. This article provides a list of those.
The following functions are available to workers:
WorkerGlobalScope.atob()WorkerGlobalScope.btoa()WorkerGlobalScope.clearInterval()WorkerGlobalScope.clearTimeout()WorkerGlobalScope.createImageBitmap()WorkerGlobalScope.dump() Non-standard
WorkerGlobalScope.fetch()WorkerGlobalScope.queueMicrotask()WorkerGlobalScope.reportError()WorkerGlobalScope.setInterval()WorkerGlobalScope.setTimeout()WorkerGlobalScope.structuredClone()DedicatedWorkerGlobalScope.postMessage() (dedicated workers only)DedicatedWorkerGlobalScope.requestAnimationFrame() (dedicated workers only)DedicatedWorkerGlobalScope.cancelAnimationFrame() (dedicated workers only)The following functions are only available to workers:
Note: If a listed API is supported by a platform in a particular version, then it can generally be assumed to be available in web workers. You can test support for a particular object or function using the Worker Playground.
The following Web APIs are available to workers:
Workers can also spawn other workers, so these APIs are also available:
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Functions_and_classes_available_to_workers