修改了三行代码,见注释,不知道这样是否可以?
if (typeof Object.create !== 'function') {
Object.create = function (o) {
var x = {}; // 设置一个空的literal对象
x.prototype = o; // 设置literal对象的prototype
return X; // 返回该对象
}
};
var another_stooge = Object.create(stooge);
【 在 shaolin (漫漫当爹路) 的大作中提到: 】
: 就创建一个空function 。
--
FROM 122.224.254.*