Recently I need to maintain a konckout.js project. Other day when I was debugging the source code, I found an operation about appending children nodes to a node in ko.utils.setDomNodeChildren.
ko.utils.emptyDomNode(domNode);
if (childNodes) {
for (var i = 0, j = childNodes.length; i < j; i++)
domNode.appendChild(childNodes[i]);
}
And I think it's better to create a document fragment, then append that fragment into domNode once. MDN createDocumentFragment
Sorry to bother, and I know it's now stable. If need any help, please contact me.
Recently I need to maintain a konckout.js project. Other day when I was debugging the source code, I found an operation about appending children nodes to a node in
ko.utils.setDomNodeChildren
.And I think it's better to create a document fragment, then append that fragment into domNode once. MDN createDocumentFragment
Sorry to bother, and I know it's now stable. If need any help, please contact me.