| 1070 | |
| 1071 | } |
| 1072 | function runClearTimeout(marker) { |
| 1073 | if (cachedClearTimeout === clearTimeout) { |
| 1074 | //normal enviroments in sane situations |
| 1075 | return clearTimeout(marker); |
| 1076 | } |
| 1077 | // if clearTimeout wasn't available but was latter defined |
| 1078 | if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { |
| 1079 | cachedClearTimeout = clearTimeout; |
| 1080 | return clearTimeout(marker); |
| 1081 | } |
| 1082 | try { |
| 1083 | // when when somebody has screwed with setTimeout but no I.E. maddness |
| 1084 | return cachedClearTimeout(marker); |
| 1085 | } catch (e){ |
| 1086 | try { |
| 1087 | // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally |
| 1088 | return cachedClearTimeout.call(null, marker); |
| 1089 | } catch (e){ |
| 1090 | // 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. |
| 1091 | // Some versions of I.E. have different rules for clearTimeout vs setTimeout |
| 1092 | return cachedClearTimeout.call(this, marker); |
| 1093 | } |
| 1094 | } |
| 1095 | |
| 1096 | |
| 1097 | |
| 1098 | } |
| 1099 | var queue = []; |
| 1100 | var draining = false; |
| 1101 | var currentQueue; |