Internet explorer Prototype.js Element.update()在IE9上引发错误

Internet explorer Prototype.js Element.update()在IE9上引发错误,internet-explorer,html-table,prototypejs,tablerow,Internet Explorer,Html Table,Prototypejs,Tablerow,我的代码如下所示: var node = parent.insertRow(before); node = $(node); node.update('<td>Hello</td><td>Hello</td><td>Hello</td>'); var node=parent.insertRow(之前); 节点=$(节点); node.update('hellohello'); 它适用于IE6、IE7、IE8、Chrome

我的代码如下所示:

var node = parent.insertRow(before);
node = $(node);
node.update('<td>Hello</td><td>Hello</td><td>Hello</td>');
var node=parent.insertRow(之前);
节点=$(节点);
node.update('hellohello');
它适用于IE6、IE7、IE8、Chrome、Firefox、Safari(Mac和Windows),但不适用于IE9

IE9抛出一个“DOM异常:ValueDyPrimultError(5)”,并在原型.js的中间指向E.StAttestor(C,F)。我使用的手表窗口显示c为“{}”,这对我来说没有任何意义

我使用的是Scriptaculous 1.9.0,其中包括原型1.7,所有研究表明该原型与IE9兼容

我知道IE对表格有特殊要求,这就是我使用IE的原因


我做错了什么?

如果将方法添加到Object.prototype,则可能需要使用defineProperty for Element#update使它们无法计算,以便在IE9上工作。当代码修改Object.prototype时,元素#update很脆弱

在我的例子中,一个图书馆做了如下工作:

Object.prototype.aFunc = function () {
    return doStuff();
};
if (navigator.userAgent.indexOf("Trident/5") > -1) {
   Object.defineProperty(Object.prototype, 'aFunc', {
      value : function () {
         return doStuff();
      },
      enumerable : false
   });
} else {
    Object.prototype.aFunc = function () {
        return doStuff();
    };
}
我使用了IE9的特殊情况来修复它,如下所示:

Object.prototype.aFunc = function () {
    return doStuff();
};
if (navigator.userAgent.indexOf("Trident/5") > -1) {
   Object.defineProperty(Object.prototype, 'aFunc', {
      value : function () {
         return doStuff();
      },
      enumerable : false
   });
} else {
    Object.prototype.aFunc = function () {
        return doStuff();
    };
}