mirror of
				https://github.com/gnh1201/welsonjs.git
				synced 2025-10-30 20:41:18 +00:00 
			
		
		
		
	Update std.js
This commit is contained in:
		
							parent
							
								
									e1df66f6f7
								
							
						
					
					
						commit
						8eb7e2ede0
					
				
							
								
								
									
										30
									
								
								lib/std.js
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								lib/std.js
									
									
									
									
									
								
							|  | @ -28,10 +28,21 @@ if (!Function.prototype.GetResource) { | |||
|     } | ||||
| } | ||||
| 
 | ||||
| // MS JScript Enumerator to Array
 | ||||
| /* | ||||
| if (!Enumerator.prototype.toArray) { | ||||
|     Enumerator.prototype.toArray = function() { | ||||
|         var items = []; | ||||
|         for (; !this.atEnd(); this.moveNext()) { | ||||
|             var item = this.item(); | ||||
|             try { | ||||
|                 items.push(item); | ||||
|             } catch (e) {} | ||||
|         } | ||||
|         return items; | ||||
|     }; | ||||
| } | ||||
| 
 | ||||
| if (!Enumerator.prototype.toArray2) { | ||||
|     Enumerator.prototype.toArray2 = function() { | ||||
|         var a = []; | ||||
|         for (; !this.atEnd(); this.moveNext()) { | ||||
|             var x = {}; | ||||
|  | @ -62,21 +73,6 @@ if (!Enumerator.prototype.toArray) { | |||
|         return a; | ||||
|     }; | ||||
| } | ||||
| */ | ||||
| 
 | ||||
| // old version
 | ||||
| if (!Enumerator.prototype.toArray) { | ||||
|     Enumerator.prototype.toArray = function() { | ||||
|         var items = []; | ||||
|         for (; !this.atEnd(); this.moveNext()) { | ||||
|             var item = this.item(); | ||||
|             try { | ||||
|                 items.push(item); | ||||
|             } catch (e) {} | ||||
|         } | ||||
|         return items; | ||||
|     }; | ||||
| } | ||||
| 
 | ||||
| /////////////////////////////////////////////////////////////////////////////////
 | ||||
| // Global APIs
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 GitHub
							GitHub