MCPcopy Create free account
hub / github.com/Code-Bullet/Jump-King / runClearTimeout

Function runClearTimeout

libraries/p5.js:7386–7412  ·  view source on GitHub ↗
(marker)

Source from the content-addressed store, hash-verified

7384
7385}
7386function runClearTimeout(marker) {
7387 if (cachedClearTimeout === clearTimeout) {
7388 //normal enviroments in sane situations
7389 return clearTimeout(marker);
7390 }
7391 // if clearTimeout wasn't available but was latter defined
7392 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
7393 cachedClearTimeout = clearTimeout;
7394 return clearTimeout(marker);
7395 }
7396 try {
7397 // when when somebody has screwed with setTimeout but no I.E. maddness
7398 return cachedClearTimeout(marker);
7399 } catch (e){
7400 try {
7401 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
7402 return cachedClearTimeout.call(null, marker);
7403 } catch (e){
7404 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
7405 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
7406 return cachedClearTimeout.call(this, marker);
7407 }
7408 }
7409
7410
7411
7412}
7413var queue = [];
7414var draining = false;
7415var currentQueue;

Callers 1

drainQueueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected