MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / runClearTimeout

Function runClearTimeout

public/javascripts/socket.io.js:546–572  ·  view source on GitHub ↗
(marker)

Source from the content-addressed store, hash-verified

544
545 }
546 function runClearTimeout(marker) {
547 if (cachedClearTimeout === clearTimeout) {
548 //normal enviroments in sane situations
549 return clearTimeout(marker);
550 }
551 // if clearTimeout wasn't available but was latter defined
552 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
553 cachedClearTimeout = clearTimeout;
554 return clearTimeout(marker);
555 }
556 try {
557 // when when somebody has screwed with setTimeout but no I.E. maddness
558 return cachedClearTimeout(marker);
559 } catch (e){
560 try {
561 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
562 return cachedClearTimeout.call(null, marker);
563 } catch (e){
564 // 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.
565 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
566 return cachedClearTimeout.call(this, marker);
567 }
568 }
569
570
571
572 }
573 var queue = [];
574 var draining = false;
575 var currentQueue;

Callers 1

drainQueueFunction · 0.85

Calls 1

callMethod · 0.80

Tested by

no test coverage detected