MCPcopy Create free account
hub / github.com/ampproject/amphtml / cancel

Method cancel

src/service/timer-impl.js:91–97  ·  view source on GitHub ↗

* Cancels the previously scheduled callback. * @param {number|string|null} timeoutId

(timeoutId)

Source from the content-addressed store, hash-verified

89 * @param {number|string|null} timeoutId
90 */
91 cancel(timeoutId) {
92 if (typeof timeoutId == 'string') {
93 this.canceled_[timeoutId] = true;
94 return;
95 }
96 this.win.clearTimeout(timeoutId);
97 }
98
99 /**
100 * Returns a promise that will resolve after the delay. Optionally, the

Callers 6

BentoLightboxWithRefFunction · 0.45
animateFunction · 0.45
updateMethod · 0.45
doPassMethod · 0.45
runScheduledTasks_Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected