MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / runClearTimeout

Function runClearTimeout

code/new-context-api/public/app.js:822–848  ·  view source on GitHub ↗
(marker)

Source from the content-addressed store, hash-verified

820
821}
822function runClearTimeout(marker) {
823 if (cachedClearTimeout === clearTimeout) {
824 //normal enviroments in sane situations
825 return clearTimeout(marker);
826 }
827 // if clearTimeout wasn't available but was latter defined
828 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
829 cachedClearTimeout = clearTimeout;
830 return clearTimeout(marker);
831 }
832 try {
833 // when when somebody has screwed with setTimeout but no I.E. maddness
834 return cachedClearTimeout(marker);
835 } catch (e){
836 try {
837 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
838 return cachedClearTimeout.call(null, marker);
839 } catch (e){
840 // 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.
841 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
842 return cachedClearTimeout.call(this, marker);
843 }
844 }
845
846
847
848}
849var queue = [];
850var draining = false;
851var currentQueue;

Callers 1

drainQueueFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected