MCPcopy
hub / github.com/RubyLouvre/anu / runTimeout

Function runTimeout

test/babel.js:1670–1692  ·  view source on GitHub ↗
(fun)

Source from the content-addressed store, hash-verified

1668 }
1669 })();
1670 function runTimeout(fun) {
1671 if (cachedSetTimeout === setTimeout) {
1672 //normal enviroments in sane situations
1673 return setTimeout(fun, 0);
1674 }
1675 // if setTimeout wasn't available but was latter defined
1676 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
1677 cachedSetTimeout = setTimeout;
1678 return setTimeout(fun, 0);
1679 }
1680 try {
1681 // when when somebody has screwed with setTimeout but no I.E. maddness
1682 return cachedSetTimeout(fun, 0);
1683 } catch (e) {
1684 try {
1685 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
1686 return cachedSetTimeout.call(null, fun, 0);
1687 } catch (e) {
1688 // 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
1689 return cachedSetTimeout.call(this, fun, 0);
1690 }
1691 }
1692 }
1693 function runClearTimeout(marker) {
1694 if (cachedClearTimeout === clearTimeout) {
1695 //normal enviroments in sane situations

Callers 2

drainQueueFunction · 0.85
babel.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected