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
4526
-
returncachedSetTimeout(fun,0);
4527
-
}catch(e){
4528
-
try{
4529
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
4530
-
returncachedSetTimeout.call(null,fun,0);
4531
-
}catch(e){
4532
-
// 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
4533
-
returncachedSetTimeout.call(this,fun,0);
4534
-
}
4535
-
}
4536
-
4537
-
4538
-
}
4539
-
functionrunClearTimeout(marker){
4540
-
if(cachedClearTimeout===clearTimeout){
4541
-
//normal enviroments in sane situations
4542
-
returnclearTimeout(marker);
4543
-
}
4544
-
// if clearTimeout wasn't available but was latter defined
// when when somebody has screwed with setTimeout but no I.E. maddness
4551
-
returncachedClearTimeout(marker);
4552
-
}catch(e){
4553
-
try{
4554
-
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
4555
-
returncachedClearTimeout.call(null,marker);
4556
-
}catch(e){
4557
-
// 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.
4558
-
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
4559
-
returncachedClearTimeout.call(this,marker);
4560
-
}
4561
-
}
4562
-
4563
-
4564
-
4565
-
}
4566
-
varqueue=[];
4567
-
vardraining=false;
4568
-
varcurrentQueue;
4569
-
varqueueIndex=-1;
4570
-
4571
-
functioncleanUpNextTick(){
4572
-
if(!draining||!currentQueue){
4573
-
return;
4574
-
}
4575
-
draining=false;
4576
-
if(currentQueue.length){
4577
-
queue=currentQueue.concat(queue);
4578
-
}else{
4579
-
queueIndex=-1;
4580
-
}
4581
-
if(queue.length){
4582
-
drainQueue();
4583
-
}
4584
-
}
4585
-
4586
-
functiondrainQueue(){
4587
-
if(draining){
4588
-
return;
4589
-
}
4590
-
vartimeout=runTimeout(cleanUpNextTick);
4591
-
draining=true;
4592
-
4593
-
varlen=queue.length;
4594
-
while(len){
4595
-
currentQueue=queue;
4596
-
queue=[];
4597
-
while(++queueIndex<len){
4598
-
if(currentQueue){
4599
-
currentQueue[queueIndex].run();
4600
-
}
4601
-
}
4602
-
queueIndex=-1;
4603
-
len=queue.length;
4604
-
}
4605
-
currentQueue=null;
4606
-
draining=false;
4607
-
runClearTimeout(timeout);
4608
-
}
4609
-
4610
-
process.nextTick=function(fun){
4611
-
varargs=newArray(arguments.length-1);
4612
-
if(arguments.length>1){
4613
-
for(vari=1;i<arguments.length;i++){
4614
-
args[i-1]=arguments[i];
4615
-
}
4616
-
}
4617
-
queue.push(newItem(fun,args));
4618
-
if(queue.length===1&&!draining){
4619
-
runTimeout(drainQueue);
4620
-
}
4621
-
};
4622
-
4623
-
// v8 likes predictible objects
4624
-
functionItem(fun,array){
4625
-
this.fun=fun;
4626
-
this.array=array;
4627
-
}
4628
-
Item.prototype.run=function(){
4629
-
this.fun.apply(null,this.array);
4630
-
};
4631
-
process.title='browser';
4632
-
process.browser=true;
4633
-
process.env={};
4634
-
process.argv=[];
4635
-
process.version='';// empty string to avoid regexp issues
4636
-
process.versions={};
4637
-
4638
-
functionnoop(){}
4639
-
4640
-
process.on=noop;
4641
-
process.addListener=noop;
4642
-
process.once=noop;
4643
-
process.off=noop;
4644
-
process.removeListener=noop;
4645
-
process.removeAllListeners=noop;
4646
-
process.emit=noop;
4647
-
process.prependListener=noop;
4648
-
process.prependOnceListener=noop;
4649
-
4650
-
process.listeners=function(name){return[]}
4651
-
4652
-
process.binding=function(name){
4653
-
thrownewError('process.binding is not supported');
0 commit comments