| 957 | |
| 958 | } |
| 959 | function runClearTimeout(marker) { |
| 960 | if (cachedClearTimeout === clearTimeout) { |
| 961 | //normal enviroments in sane situations |
| 962 | return clearTimeout(marker); |
| 963 | } |
| 964 | // if clearTimeout wasn't available but was latter defined |
| 965 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { |
| 966 | cachedClearTimeout = clearTimeout; |
| 967 | return clearTimeout(marker); |
| 968 | } |
| 969 | try { |
| 970 | // when when somebody has screwed with setTimeout but no I.E. maddness |
| 971 | return cachedClearTimeout(marker); |
| 972 | } catch (e){ |
| 973 | try { |
| 974 | // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally |
| 975 | return cachedClearTimeout.call(null, marker); |
| 976 | } catch (e){ |
| 977 | // 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. |
| 978 | // Some versions of I.E. have different rules for clearTimeout vs setTimeout |
| 979 | return cachedClearTimeout.call(this, marker); |
| 980 | } |
| 981 | } |
| 982 | |
| 983 | |
| 984 | |
| 985 | } |
| 986 | var queue = []; |
| 987 | var draining = false; |
| 988 | var currentQueue; |