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

Function runClearTimeout

code/dependency-injection/public/app.js:914–940  ·  view source on GitHub ↗
(marker)

Source from the content-addressed store, hash-verified

912
913}
914function runClearTimeout(marker) {
915 if (cachedClearTimeout === clearTimeout) {
916 //normal enviroments in sane situations
917 return clearTimeout(marker);
918 }
919 // if clearTimeout wasn't available but was latter defined
920 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
921 cachedClearTimeout = clearTimeout;
922 return clearTimeout(marker);
923 }
924 try {
925 // when when somebody has screwed with setTimeout but no I.E. maddness
926 return cachedClearTimeout(marker);
927 } catch (e){
928 try {
929 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
930 return cachedClearTimeout.call(null, marker);
931 } catch (e){
932 // 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.
933 // Some versions of I.E. have different rules for clearTimeout vs setTimeout
934 return cachedClearTimeout.call(this, marker);
935 }
936 }
937
938
939
940}
941var queue = [];
942var draining = false;
943var currentQueue;

Callers 1

drainQueueFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected