Window: cancelIdleCallback() method

Khả dụng hạn chế

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().

Cú pháp

js
cancelIdleCallback(handle)

Parameters

handle

The ID value returned by window.requestIdleCallback() when the callback was established.

Return value

None (undefined).

Ví dụ

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

Đặc tả kỹ thuật

Thông số kỹ thuật
requestIdleCallback()
# the-cancelidlecallback-method

Tính tương thích trên trình duyệt