some more support for opera

This commit is contained in:
rlx 2011-09-03 15:25:52 +00:00
commit 74873e3bfb
5 changed files with 203 additions and 129 deletions

View file

@ -142,6 +142,23 @@ if (!Array.prototype.reduce) {
};
}
// see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/keys
if (!Object.keys) {
Object.keys = function(obj) {
if (obj !== Object(obj)) {
throw new TypeError();
}
var key,
ret = [];
for (key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
ret.push(key);
}
}
return ret;
}
}
//@ Core -----------------------------------------------------------------------
/*@