This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Summary
The window.cancelIdleCallback()
method cancels a callback previously scheduled with window.requestIdleCallback()
.
Syntax
window.cancelIdleCallback(handle);
Parameters
handle
- The ID value returned by
window.requestIdleCallback()
when the callback was established.
Return value
undefined
.
Example
See our complete example in the article Cooperative Scheduling of Background Tasks API.
Specifications
Specification | Status | Comment |
---|---|---|
Cooperative Scheduling of Background Tasks | Proposed Recommendation | Initial definition. |
Browser compatibility
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
cancelIdleCallback | Chrome Full support 47 | Edge Full support 79 | Firefox
Full support
55
| IE No support No | Opera Full support Yes | Safari No support No | WebView Android Full support 47 | Chrome Android Full support 47 | Firefox Android
Full support
55
| Opera Android Full support Yes | Safari iOS No support No | Samsung Internet Android Full support 5.0 |
Legend
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.
- User must explicitly enable this feature.
- User must explicitly enable this feature.