MCPcopy Create free account
hub / github.com/UI5/webcomponents / runTimeout

Function runTimeout

packages/main/test/pages/diffable-html.js:5752–5776  ·  view source on GitHub ↗
(fun)

Source from the content-addressed store, hash-verified

5750 }
5751 } ())
5752 function runTimeout(fun) {
5753 if (cachedSetTimeout === setTimeout) {
5754 //normal enviroments in sane situations
5755 return setTimeout(fun, 0);
5756 }
5757 // if setTimeout wasn't available but was latter defined
5758 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
5759 cachedSetTimeout = setTimeout;
5760 return setTimeout(fun, 0);
5761 }
5762 try {
5763 // when when somebody has screwed with setTimeout but no I.E. maddness
5764 return cachedSetTimeout(fun, 0);
5765 } catch(e){
5766 try {
5767 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
5768 return cachedSetTimeout.call(null, fun, 0);
5769 } catch(e){
5770 // 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
5771 return cachedSetTimeout.call(this, fun, 0);
5772 }
5773 }
5774
5775
5776 }
5777 function runClearTimeout(marker) {
5778 if (cachedClearTimeout === clearTimeout) {
5779 //normal enviroments in sane situations

Callers 2

drainQueueFunction · 0.85
diffable-html.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…