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