mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-12 00:45:14 +00:00
Update std.js
This commit is contained in:
parent
3d71c4d5bc
commit
fe075354fc
16
lib/std.js
16
lib/std.js
|
@ -10,6 +10,7 @@
|
|||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Polyfills
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (!Function.prototype.GetResource) {
|
||||
Function.prototype.GetResource = function(ResourceName) {
|
||||
if (!this.Resources) {
|
||||
|
@ -29,14 +30,17 @@ if (!Function.prototype.GetResource) {
|
|||
|
||||
if (!Enumerator.prototype.toArray) {
|
||||
Enumerator.prototype.toArray = function() {
|
||||
var items = [];
|
||||
var a = [];
|
||||
for (; !this.atEnd(); this.moveNext()) {
|
||||
var item = this.item();
|
||||
try {
|
||||
items.push(item);
|
||||
} catch (e) {}
|
||||
var x = {};
|
||||
var b = new Enumerator(this.item().Properties_);
|
||||
for (; !b.atEnd(); b.moveNext()) {
|
||||
var c = b.item();
|
||||
x[c.name] = c.value;
|
||||
}
|
||||
a.push(x);
|
||||
}
|
||||
return items;
|
||||
return a;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user