Exception ``[Exception... "Illegal operation on WrappedNative prototype object" nsresult: "0x8057000c (NS_ERROR_XPC_BAD_OP_ON_WN_PROTO)" location: "JS frame :: http://localhost/source/lib/browsers/gecko.js :: anonymous :: line 290" data: no]'' thrown from function anonymous() in <http://localhost/source/lib/browsers/gecko.js> line 290.
element.__defineGetter__("text", function(){return this.firstChild.nodeValue});
if (window.XPathEvaluator) {
var xpath = new XPathEvaluator();
var element = Element.prototype;
var attr = Attr.prototype;
delete element.text;
delete attr.text;
element.selectNodes = function (path) {
var result = xpath.evaluate(path, this, this.ownerDocument._ns, 7, null);
var i, nodes = [];
for (i=0; i<result.snapshotLength; i++) {
nodes[i] = result.snapshotItem(i);
nodes[i].text = nodes[i].firstChild ? nodes[i].firstChild.nodeValue : "";
}
return nodes;
};
element.selectSingleNode = function (path) {
var node = xpath.evaluate(path, this, this.ownerDocument._ns, 9, null).singleNodeValue;
node.text = node.firstChild ? node.firstChild.nodeValue : "";
return node;
};
}
if (window.XPathEvaluator) {
var xpath = new XPathEvaluator();
var element = Element.prototype;
var attr = Attr.prototype;
var doc = Document.prototype;
delete element.text;
delete attr.text;
element.selectNodes = function (path) {
var result = xpath.evaluate(path, this, this.ownerDocument._ns, 7, null);
var i, nodes = [];
for (i=0; i<result.snapshotLength; i++) {
nodes[i] = result.snapshotItem(i);
nodes[i].text = nodes[i].firstChild ? nodes[i].firstChild.nodeValue : "";
}
return nodes;
};
element.selectSingleNode = function (path) {
var node = xpath.evaluate(path, this, this.ownerDocument._ns, 9, null).singleNodeValue;
dump('element.selectSingleNode(path): ' + path + '\n');
if ( node != null ) node.text = node.firstChild ? node.firstChild.nodeValue : "";
return node;
};
doc.selectSingleNode = function (path) {
dump('doc.selectSingleNode(path): ' + path + '\n');
var node = xpath.evaluate(path, this, this._ns, 9, null).singleNodeValue;
if ( node != null ) node.text = node.firstChild ? node.firstChild.nodeValue : "";
return node;
};
doc.selectNodes = function (path) {
var result = xpath.evaluate(path, this, this._ns, 7, null);
var i, nodes = [];
for (i=0; i<result.snapshotLength; i++) {
nodes[i] = result.snapshotItem(i);
nodes[i].text = nodes[i].firstChild ? nodes[i].firstChild.nodeValue : "";
}
return nodes;
};
}
(function(){
if (window.__defineGetter__) {
var stylesheet = CSSStyleSheet.prototype;
delete stylesheet.rules;
stylesheet.__proto__ = {__proto__: stylesheet.__proto__};
stylesheet.__proto__.__defineGetter__("rules", function(){
return this.cssRules;
});
var text = Text.prototype;
text.__proto__ = {__proto__: text.__proto__};
text.__proto__.__defineGetter__("text", function(){
return this.nodeValue;
});
var attr = Attr.prototype;
delete attr.text;
attr.__proto__ = {__proto__: attr.__proto__};
attr.__proto__.__defineGetter__("text", function(){
return this.nodeValue;
});
var element = Element.prototype;
delete element.text;
element.__proto__ = {__proto__: element.__proto__};
element.__proto__.__defineGetter__("text", function(){
var i, a=[], nodes = this.childNodes, length = nodes.length;
for (i=0; i<length; i++){
a[i] = nodes[i].text;
}
return a.join("");
});
}
})();
<script src="/admin/grid/runtime/lib/grid.js" type="text/javascript" language="JavaScript"></script>
<script src="/admin/js/gridpatches.js" type="text/javascript" language="JavaScript"></script>
if (window.XPathEvaluator) {
(function(){
if (window.__defineGetter__) {
var stylesheet = CSSStyleSheet.prototype;
delete stylesheet.rules;
stylesheet.__proto__ = {__proto__: stylesheet.__proto__};
stylesheet.__proto__.__defineGetter__("rules", function(){
return this.cssRules;
});
var text = Text.prototype;
text.__proto__ = {__proto__: text.__proto__};
text.__proto__.__defineGetter__("text", function(){
return this.nodeValue;
});
var attr = Attr.prototype;
delete attr.text;
attr.__proto__ = {__proto__: attr.__proto__};
attr.__proto__.__defineGetter__("text", function(){
return this.nodeValue;
});
var element = Element.prototype;
delete element.text;
element.__proto__ = {__proto__: element.__proto__};
element.__proto__.__defineGetter__("text", function(){
var i, a=[], nodes = this.childNodes, length = nodes.length;
for (i=0; i<length; i++){
a[i] = nodes[i].text;
}
return a.join("");
});
}
})();
}
This topic is archived.