MCPcopy Index your code
hub / github.com/krasimir/react-in-patterns / runTimeout

Function runTimeout

code/composition/public/app.js:934–958  ·  view source on GitHub ↗
(fun)

Source from the content-addressed store, hash-verified

932 }
933} ())
934function runTimeout(fun) {
935 if (cachedSetTimeout === setTimeout) {
936 //normal enviroments in sane situations
937 return setTimeout(fun, 0);
938 }
939 // if setTimeout wasn't available but was latter defined
940 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
941 cachedSetTimeout = setTimeout;
942 return setTimeout(fun, 0);
943 }
944 try {
945 // when when somebody has screwed with setTimeout but no I.E. maddness
946 return cachedSetTimeout(fun, 0);
947 } catch(e){
948 try {
949 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
950 return cachedSetTimeout.call(null, fun, 0);
951 } catch(e){
952 // 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
953 return cachedSetTimeout.call(this, fun, 0);
954 }
955 }
956
957
958}
959function runClearTimeout(marker) {
960 if (cachedClearTimeout === clearTimeout) {
961 //normal enviroments in sane situations

Callers 2

drainQueueFunction · 0.70
app.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected