The Window.cancelIdleCallback() enables you to cancel a callback previously scheduled with Window.requestIdleCallback.
The window.requestIdleCallback() method queues a function to be called during a browser's idle periods. This enables developers to perform background and low priority work on the main event loop, without impacting latency-critical events such as animation and input response. Functions are generally called in first-in-first-out order unless the function's timeout is reached before the browser calls it.
Cancels a timed, repeating action which was previously established by a call to setInterval().
Repeatedly calls a function or executes a code snippet, with a fixed time delay between each call. Returns an intervalID.
Sets a timer which executes a function or specified piece of code once after the timer expires.