Avoid making a copy of childNodes when a dom fragment is inserted in the logical tree.

This commit is contained in:
Steven Orvell 2015-12-04 14:33:21 -08:00
parent 43fc853750
commit dcbafbfc16

View File

@ -99,10 +99,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
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 {