Remove more unused knockout code

This commit is contained in:
djmaze 2020-10-28 13:58:37 +01:00
parent d0f5828751
commit ff6fb41812
14 changed files with 224 additions and 399 deletions

View file

@ -19,7 +19,7 @@
// Any in-flight loading operation is no longer relevant, so make sure we ignore its completion
currentLoadingOperationId = null;
},
originalChildNodes = ko.utils.makeArray(ko.virtualElements.childNodes(element));
originalChildNodes = [...ko.virtualElements.childNodes(element)];
ko.virtualElements.emptyNode(element);
ko.utils.domNodeDisposal.addDisposeCallback(element, disposeAssociatedComponentViewModel);

View file

@ -100,7 +100,7 @@
callback(templateConfig);
} else if (templateConfig instanceof DocumentFragment) {
// Document fragment - use its child nodes
callback(ko.utils.makeArray(templateConfig.childNodes));
callback([...templateConfig.childNodes]);
} else if (templateConfig['element']) {
var element = templateConfig['element'];
if (element instanceof HTMLElement) {