| 820 | |
| 821 | } |
| 822 | function runClearTimeout(marker) { |
| 823 | if (cachedClearTimeout === clearTimeout) { |
| 824 | //normal enviroments in sane situations |
| 825 | return clearTimeout(marker); |
| 826 | } |
| 827 | // if clearTimeout wasn't available but was latter defined |
| 828 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { |
| 829 | cachedClearTimeout = clearTimeout; |
| 830 | return clearTimeout(marker); |
| 831 | } |
| 832 | try { |
| 833 | // when when somebody has screwed with setTimeout but no I.E. maddness |
| 834 | return cachedClearTimeout(marker); |
| 835 | } catch (e){ |
| 836 | try { |
| 837 | // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally |
| 838 | return cachedClearTimeout.call(null, marker); |
| 839 | } catch (e){ |
| 840 | // 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. |
| 841 | // Some versions of I.E. have different rules for clearTimeout vs setTimeout |
| 842 | return cachedClearTimeout.call(this, marker); |
| 843 | } |
| 844 | } |
| 845 | |
| 846 | |
| 847 | |
| 848 | } |
| 849 | var queue = []; |
| 850 | var draining = false; |
| 851 | var currentQueue; |