Skip to content

Commit

Permalink
Remove unused KnockoutJS code
Browse files Browse the repository at this point in the history
  • Loading branch information
djmaze committed Aug 10, 2021
1 parent 3a32a09 commit 89075b1
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 106 deletions.
25 changes: 8 additions & 17 deletions vendors/knockout/build/output/knockout-latest.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -2132,16 +2132,12 @@ ko.expressionRewriting = (() => {
}

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);
}
Expand Down Expand Up @@ -2259,9 +2255,9 @@ ko.expressionRewriting = (() => {
// Use of allBindings as a function is deprecated and removed
// The following is the 3.x allBindings API
var allBindings = {
'get': key => bindings[key] && getValueAccessor(key)(),
'has': key => key in bindings
};
'get': key => bindings[key] && getValueAccessor(key)(),
'has': key => key in bindings
};

if (ko.bindingEvent.childrenComplete in bindings) {
ko.bindingEvent.subscribe(node, ko.bindingEvent.childrenComplete, () => {
Expand Down Expand Up @@ -2348,11 +2344,6 @@ ko.expressionRewriting = (() => {
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);
Expand Down
Loading

0 comments on commit 89075b1

Please sign in to comment.