Back to Content

Window: cancelIdleCallback() method

files/en-us/web/api/window/cancelidlecallback/index.md

latest670 B
Original Source

{{APIRef}}

The window.cancelIdleCallback() method cancels a callback previously scheduled with {{domxref("window.requestIdleCallback()")}}.

Syntax

js-nolint
cancelIdleCallback(handle)

Parameters

  • handle
    • : The ID value returned by {{domxref("window.requestIdleCallback()")}} when the callback was established.

Return value

None ({{jsxref("undefined")}}).

Examples

See our complete example in the article Cooperative Scheduling of Background Tasks API.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}