git ssb

1+

Matt McKegg / mutant



Commit 1b3ee2905a0cb00a98265dfd85dc66f2e87d675b

html-element: add note about optimising replace

Matt McKegg committed on 7/21/2016, 4:11:48 AM
Parent: be0df157d2e308a5ea7014d2d266d2d48f87699d

Files changed

html-element.jschanged
html-element.jsView
@@ -85,8 +85,9 @@
8585 })
8686 }
8787
8888 function replace (oldNodes, newNodes) {
89 + // TODO: optmize to not reinsert nodes that are already in correct position!
8990 var parent = oldNodes[oldNodes.length - 1].parentNode
9091 var marker = oldNodes[oldNodes.length - 1].nextSibling
9192 oldNodes.filter(function (node) {
9293 return !~newNodes.indexOf(node)

Built with git-ssb-web