新增下列程式來解決這個問題:
Object.keys = Object.keys || function(o) {
var result = [];
for(var name in o) {
if (o.hasOwnProperty(name))
result.push(name);
}
return result;
};
來源: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
沒有留言:
張貼留言