Window: cancelIdleCallback() method
Limited availability
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().
Syntax
js
cancelIdleCallback(handle)
Parameters
handle-
The ID value returned by
window.requestIdleCallback()when the callback was established.
Return value
None (undefined).
Examples
See our complete example in the article Cooperative Scheduling of Background Tasks API.
Specifications
| Specification |
|---|
| requestIdleCallback() # the-cancelidlecallback-method |
Browser compatibility
| desktop | mobile | server | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cancelIdleCallback
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- See implementation notes.