| 854 | |
| 855 | } |
| 856 | function runClearTimeout(marker) { |
| 857 | if (cachedClearTimeout === clearTimeout) { |
| 858 | //normal enviroments in sane situations |
| 859 | return clearTimeout(marker); |
| 860 | } |
| 861 | // if clearTimeout wasn't available but was latter defined |
| 862 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { |
| 863 | cachedClearTimeout = clearTimeout; |
| 864 | return clearTimeout(marker); |
| 865 | } |
| 866 | try { |
| 867 | // when when somebody has screwed with setTimeout but no I.E. maddness |
| 868 | return cachedClearTimeout(marker); |
| 869 | } catch (e){ |
| 870 | try { |
| 871 | // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally |
| 872 | return cachedClearTimeout.call(null, marker); |
| 873 | } catch (e){ |
| 874 | // 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. |
| 875 | // Some versions of I.E. have different rules for clearTimeout vs setTimeout |
| 876 | return cachedClearTimeout.call(this, marker); |
| 877 | } |
| 878 | } |
| 879 | |
| 880 | |
| 881 | |
| 882 | } |
| 883 | var queue = []; |
| 884 | var draining = false; |
| 885 | var currentQueue; |