| 783 | |
| 784 | } |
| 785 | function runClearTimeout(marker) { |
| 786 | if (cachedClearTimeout === clearTimeout) { |
| 787 | //normal enviroments in sane situations |
| 788 | return clearTimeout(marker); |
| 789 | } |
| 790 | // if clearTimeout wasn't available but was latter defined |
| 791 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { |
| 792 | cachedClearTimeout = clearTimeout; |
| 793 | return clearTimeout(marker); |
| 794 | } |
| 795 | try { |
| 796 | // when when somebody has screwed with setTimeout but no I.E. maddness |
| 797 | return cachedClearTimeout(marker); |
| 798 | } catch (e){ |
| 799 | try { |
| 800 | // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally |
| 801 | return cachedClearTimeout.call(null, marker); |
| 802 | } catch (e){ |
| 803 | // 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. |
| 804 | // Some versions of I.E. have different rules for clearTimeout vs setTimeout |
| 805 | return cachedClearTimeout.call(this, marker); |
| 806 | } |
| 807 | } |
| 808 | |
| 809 | |
| 810 | |
| 811 | } |
| 812 | var queue = []; |
| 813 | var draining = false; |
| 814 | var currentQueue; |