Fix innerHTML children assignments to help fix issue #76.

pull/86/head
Gijs Kruitbosch 10 years ago
parent 194a5376c8
commit bc7873d313

@ -608,6 +608,7 @@
this.childNodes[i].parentNode = null; this.childNodes[i].parentNode = null;
} }
this.childNodes = node.childNodes; this.childNodes = node.childNodes;
this.children = node.children;
for (var i = this.childNodes.length; --i >= 0;) { for (var i = this.childNodes.length; --i >= 0;) {
this.childNodes[i].parentNode = this; this.childNodes[i].parentNode = this;
} }
@ -621,6 +622,7 @@
var node = new Text(); var node = new Text();
this.childNodes = [ node ]; this.childNodes = [ node ];
this.children = [];
node.textContent = text; node.textContent = text;
node.parentNode = this; node.parentNode = this;
}, },

Loading…
Cancel
Save