This is an experimental technologyCheck 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.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Chrome
Full support 47 |
Edge
Full support 79 |
Firefox Full support 55 Full support 55 Full support 53 Disabled' From version 53: this feature is behind the |
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 Full support 55 Full support 53 Disabled' From version 53: this feature is behind the |
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.
window.cancelIdleCallback() by Mozilla Contributors is licensed under CC-BY-SA 2.5.