Window: clearImmediate() method

This method clears the action specified by window.setImmediate.

Note: This method is not expected to become standard, and is nowadays only implemented by Node.js 0.10+. It meets resistance both from Gecko (Firefox) and Chromium/WebKit (Chrome/Safari).

Syntax

js

clearImmediate(immediateID)

Parameters

immediateID

The ID returned by window.setImmediate.

Return value

None (undefined).

Examples

js

let immediateID = setImmediate(() => {
  // Run some code
});

document.getElementById("button").addEventListener(() => {
  clearImmediate(immediateID);
});

Specifications

Not part of any current specifications. The Efficient Script Yielding specification is no longer being worked on.

Browser compatibility

BCD tables only load in the browser

See also