Window.clearImmediate()

This method clears the action specified by window.setImmediate.

Note: This method is not expected to become standard, and is only implemented by recent builds of Internet Explorer and Node.js 0.10+. It meets resistance both from Gecko (Firefox) and Webkit (Google/Apple).

Syntax

clearImmediate(immediateID)

Parameters

immediateID

The ID returned by window.setImmediate.

Return value

None (undefined).

Examples

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