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

Function runClearTimeout

code/higher-order-components/public/app.js:815–841  ·  view source on GitHub ↗
(marker)

Source from the content-addressed store, hash-verified

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

Callers 1

drainQueueFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected