| 692 | |
| 693 | } |
| 694 | function runClearTimeout(marker) { |
| 695 | if (cachedClearTimeout === clearTimeout) { |
| 696 | //normal enviroments in sane situations |
| 697 | return clearTimeout(marker); |
| 698 | } |
| 699 | // if clearTimeout wasn't available but was latter defined |
| 700 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { |
| 701 | cachedClearTimeout = clearTimeout; |
| 702 | return clearTimeout(marker); |
| 703 | } |
| 704 | try { |
| 705 | // when when somebody has screwed with setTimeout but no I.E. maddness |
| 706 | return cachedClearTimeout(marker); |
| 707 | } catch (e){ |
| 708 | try { |
| 709 | // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally |
| 710 | return cachedClearTimeout.call(null, marker); |
| 711 | } catch (e){ |
| 712 | // 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. |
| 713 | // Some versions of I.E. have different rules for clearTimeout vs setTimeout |
| 714 | return cachedClearTimeout.call(this, marker); |
| 715 | } |
| 716 | } |
| 717 | |
| 718 | |
| 719 | |
| 720 | } |
| 721 | var queue = []; |
| 722 | var draining = false; |
| 723 | var currentQueue; |