Skip to content

Commit

Permalink
Avoid making a copy of childNodes when a dom fragment is inserted in …
Browse files Browse the repository at this point in the history
…the logical tree.
  • Loading branch information
Steven Orvell committed Dec 4, 2015
1 parent 43fc853 commit dcbafbf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/dom-tree-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@
container.__childNodes = null;
// handle document fragments
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
// NOTE: the act of setting this info can affect patched nodes
// TODO(sorvell): remember this for patching:
// the act of setting this info can affect patched nodes
// getters; therefore capture childNodes before patching.
var c$ = TreeApi.arrayCopyChildNodes(node);
for (var i=0, n; (i<c$.length) && (n=c$[i]); i++) {
for (var n=node.firstChild; n; n=n.nextSibling) {
this._linkNode(n, container, ref_node);
}
} else {
Expand Down

0 comments on commit dcbafbf

Please sign in to comment.