mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 08:24:50 +03:00
Remove unused KnockoutJS code
This commit is contained in:
parent
3a32a09f2a
commit
89075b18bf
3 changed files with 88 additions and 106 deletions
|
|
@ -269,16 +269,12 @@
|
|||
}
|
||||
|
||||
function applyBindingsToDescendantsInternal(bindingContext, elementOrVirtualElement) {
|
||||
var nextInQueue = ko.virtualElements.firstChild(elementOrVirtualElement);
|
||||
var currentChild, nextInQueue = ko.virtualElements.firstChild(elementOrVirtualElement);
|
||||
|
||||
if (nextInQueue) {
|
||||
var currentChild;
|
||||
|
||||
while (currentChild = nextInQueue) {
|
||||
// Keep a record of the next child *before* applying bindings, in case the binding removes the current child from its position
|
||||
nextInQueue = ko.virtualElements.nextSibling(currentChild);
|
||||
applyBindingsToNodeAndDescendantsInternal(bindingContext, currentChild);
|
||||
}
|
||||
while (currentChild = nextInQueue) {
|
||||
// Keep a record of the next child *before* applying bindings, in case the binding removes the current child from its position
|
||||
nextInQueue = ko.virtualElements.nextSibling(currentChild);
|
||||
applyBindingsToNodeAndDescendantsInternal(bindingContext, currentChild);
|
||||
}
|
||||
ko.bindingEvent.notify(elementOrVirtualElement, ko.bindingEvent.childrenComplete);
|
||||
}
|
||||
|
|
@ -485,11 +481,6 @@
|
|||
ko.applyBindingAccessorsToNode = (node, bindings, viewModelOrBindingContext) =>
|
||||
applyBindingsToNodeInternal(node, bindings, getBindingContext(viewModelOrBindingContext));
|
||||
|
||||
ko.applyBindingsToNode = (node, bindings, viewModelOrBindingContext) => {
|
||||
var context = getBindingContext(viewModelOrBindingContext);
|
||||
return ko.applyBindingAccessorsToNode(node, makeBindingAccessors(bindings, context, node), context);
|
||||
};
|
||||
|
||||
ko.applyBindingsToDescendants = (viewModelOrBindingContext, rootNode) => {
|
||||
if (rootNode.nodeType === 1 || rootNode.nodeType === 8)
|
||||
applyBindingsToDescendantsInternal(getBindingContext(viewModelOrBindingContext), rootNode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue