coderef

requestAnimationFrame() in workersBaseline · Widely available

The requestAnimationFrame() method in workers schedules a function that runs before the next repaint. Together with offscreen canvas, you can animate content from a worker.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Mar 27, 2023. Widely available since Sep 27, 2025.

Browser support

DesktopChrome
1–68Not supported
69+Supportedsince Sep 4, 2018
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–98Not supported
99+Supportedsince Apr 5, 2022
Current: 157
Safari
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27
MobileChrome Android
18–68Not supported
69+Supportedsince Sep 4, 2018
Current: 155
Firefox Android
4–98Not supported
99+Supportedsince Apr 5, 2022
Current: 157
Safari iOS
1–16.3Not supported
16.4+Supportedsince Mar 27, 2023
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: cancelAnimationFrame.

Feature detection

JS · check before using
if ("DedicatedWorkerGlobalScope" in globalThis && "requestAnimationFrame" in DedicatedWorkerGlobalScope.prototype) {
  // DedicatedWorkerGlobalScope.requestAnimationFrame is available
}

Sub-features

Support for each part of the feature (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
DedicatedWorkerGlobalScope.cancelAnimationFrame69799916.4699916.4
DedicatedWorkerGlobalScope.requestAnimationFrame69799916.4699916.4