This feature is not Baseline because it does not work in some of the most widely-used browsers.
The window.cancelIdleCallback() method cancels a callback previously scheduled with window.requestIdleCallback().
cancelIdleCallback(handle)
handleThe ID value returned by window.requestIdleCallback() when the callback was established.
None (undefined).
See our complete example in the article Cooperative Scheduling of Background Tasks API.
| Specification |
|---|
| requestIdleCallback()> # the-cancelidlecallback-method> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
cancelIdleCallback |
47 | 79 | 55 | 34 | No | 47 | 55 | 34 | No | 5.0 | 47 | No |
© 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/Window/cancelIdleCallback