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

Function runClearTimeout

code/controlled-uncontrolled/public/app.js:785–811  ·  view source on GitHub ↗
(marker)

Source from the content-addressed store, hash-verified

783
784}
785function runClearTimeout(marker) {
786 if (cachedClearTimeout === clearTimeout) {
787 //normal enviroments in sane situations
788 return clearTimeout(marker);
789 }
790 // if clearTimeout wasn't available but was latter defined
791 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
792 cachedClearTimeout = clearTimeout;
793 return clearTimeout(marker);
794 }
795 try {
796 // when when somebody has screwed with setTimeout but no I.E. maddness
797 return cachedClearTimeout(marker);
798 } catch (e){
799 try {
800 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
801 return cachedClearTimeout.call(null, marker);
802 } catch (e){
803 // 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.
804 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
805 return cachedClearTimeout.call(this, marker);
806 }
807 }
808
809
810
811}
812var queue = [];
813var draining = false;
814var currentQueue;

Callers 1

drainQueueFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected