我的个人库中有几个定义,这个在 Safari 中生成错误:
Object.defineProperty(Element.prototype, "remove", {
enumerable: false,
configurable: false,
writable: false,
value: function(){
this.parentElement.removeChild(this);
}
});
错误:TypeError: Attempting to change enumerable attribute of unconfigurable property。
我不明白这句话的确切含义,在 FireFox 中不会发生此错误。