You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// when when somebody has screwed with setTimeout but no I.E. maddness
2069
-
returncachedSetTimeout(fun,0);
2070
-
}catch(e){
2071
-
try{
2072
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
2073
-
returncachedSetTimeout.call(null,fun,0);
2074
-
}catch(e){
2075
-
// 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
2076
-
returncachedSetTimeout.call(this,fun,0);
2077
-
}
2078
-
}
2079
-
2080
-
2081
-
}
2082
-
functionrunClearTimeout(marker){
2083
-
if(cachedClearTimeout===clearTimeout){
2084
-
//normal enviroments in sane situations
2085
-
returnclearTimeout(marker);
2086
-
}
2087
-
// if clearTimeout wasn't available but was latter defined
// when when somebody has screwed with setTimeout but no I.E. maddness
2094
-
returncachedClearTimeout(marker);
2095
-
}catch(e){
2096
-
try{
2097
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
2098
-
returncachedClearTimeout.call(null,marker);
2099
-
}catch(e){
2100
-
// 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.
2101
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
2102
-
returncachedClearTimeout.call(this,marker);
2103
-
}
2104
-
}
2105
-
2106
-
2107
-
2108
-
}
2109
-
varqueue=[];
2110
-
vardraining=false;
2111
-
varcurrentQueue;
2112
-
varqueueIndex=-1;
2113
-
2114
-
functioncleanUpNextTick(){
2115
-
if(!draining||!currentQueue){
2116
-
return;
2117
-
}
2118
-
draining=false;
2119
-
if(currentQueue.length){
2120
-
queue=currentQueue.concat(queue);
2121
-
}else{
2122
-
queueIndex=-1;
2123
-
}
2124
-
if(queue.length){
2125
-
drainQueue();
2126
-
}
2127
-
}
2128
-
2129
-
functiondrainQueue(){
2130
-
if(draining){
2131
-
return;
2132
-
}
2133
-
vartimeout=runTimeout(cleanUpNextTick);
2134
-
draining=true;
2135
-
2136
-
varlen=queue.length;
2137
-
while(len){
2138
-
currentQueue=queue;
2139
-
queue=[];
2140
-
while(++queueIndex<len){
2141
-
if(currentQueue){
2142
-
currentQueue[queueIndex].run();
2143
-
}
2144
-
}
2145
-
queueIndex=-1;
2146
-
len=queue.length;
2147
-
}
2148
-
currentQueue=null;
2149
-
draining=false;
2150
-
runClearTimeout(timeout);
2151
-
}
2152
-
2153
-
process.nextTick=function(fun){
2154
-
varargs=newArray(arguments.length-1);
2155
-
if(arguments.length>1){
2156
-
for(vari=1;i<arguments.length;i++){
2157
-
args[i-1]=arguments[i];
2158
-
}
2159
-
}
2160
-
queue.push(newItem(fun,args));
2161
-
if(queue.length===1&&!draining){
2162
-
runTimeout(drainQueue);
2163
-
}
2164
-
};
2165
-
2166
-
// v8 likes predictible objects
2167
-
functionItem(fun,array){
2168
-
this.fun=fun;
2169
-
this.array=array;
2170
-
}
2171
-
Item.prototype.run=function(){
2172
-
this.fun.apply(null,this.array);
2173
-
};
2174
-
process.title='browser';
2175
-
process.browser=true;
2176
-
process.env={};
2177
-
process.argv=[];
2178
-
process.version='';// empty string to avoid regexp issues
2179
-
process.versions={};
2180
-
2181
-
functionnoop(){}
2182
-
2183
-
process.on=noop;
2184
-
process.addListener=noop;
2185
-
process.once=noop;
2186
-
process.off=noop;
2187
-
process.removeListener=noop;
2188
-
process.removeAllListeners=noop;
2189
-
process.emit=noop;
2190
-
process.prependListener=noop;
2191
-
process.prependOnceListener=noop;
2192
-
2193
-
process.listeners=function(name){return[]}
2194
-
2195
-
process.binding=function(name){
2196
-
thrownewError('process.binding is not supported');
0 commit comments