MCPcopy Create free account
hub / github.com/plotly/dash / runTimeout

Function runTimeout

dash/deps/prop-types@15.8.1.js:953–977  ·  view source on GitHub ↗
(fun)

Source from the content-addressed store, hash-verified

951 }
952} ())
953function runTimeout(fun) {
954 if (cachedSetTimeout === setTimeout) {
955 //normal enviroments in sane situations
956 return setTimeout(fun, 0);
957 }
958 // if setTimeout wasn't available but was latter defined
959 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
960 cachedSetTimeout = setTimeout;
961 return setTimeout(fun, 0);
962 }
963 try {
964 // when when somebody has screwed with setTimeout but no I.E. maddness
965 return cachedSetTimeout(fun, 0);
966 } catch(e){
967 try {
968 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
969 return cachedSetTimeout.call(null, fun, 0);
970 } catch(e){
971 // 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
972 return cachedSetTimeout.call(this, fun, 0);
973 }
974 }
975
976
977}
978function runClearTimeout(marker) {
979 if (cachedClearTimeout === clearTimeout) {
980 //normal enviroments in sane situations

Callers 2

drainQueueFunction · 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…