From ca170f24614ef5220f2584f74aeebe34d43f094a Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Sun, 3 Mar 2024 19:17:26 +0100 Subject: [PATCH] KnockoutJS drop unused `$parentContext` and `$parents` --- vendors/knockout/src/binding/bindingAttributeSyntax.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vendors/knockout/src/binding/bindingAttributeSyntax.js b/vendors/knockout/src/binding/bindingAttributeSyntax.js index bf0f9d4bc..2808b9939 100644 --- a/vendors/knockout/src/binding/bindingAttributeSyntax.js +++ b/vendors/knockout/src/binding/bindingAttributeSyntax.js @@ -42,7 +42,6 @@ ko.bindingContext = class { self[contextAncestorBindingInfo] = parentContext[contextAncestorBindingInfo]; } } else { - self['$parents'] = []; self['$root'] = dataItem; // Export 'ko' in the binding context so it will be available in bindings and templates @@ -107,10 +106,7 @@ ko.bindingContext = class { 'createChildContext'(dataItemOrAccessor, options) { return new ko.bindingContext(dataItemOrAccessor, this, (self, parentContext) => { // Extend the context hierarchy by setting the appropriate pointers - self['$parentContext'] = parentContext; self['$parent'] = parentContext['$data']; - self['$parents'] = (parentContext['$parents'] || []).slice(0); - self['$parents'].unshift(self['$parent']); options['extend']?.(self); }, options); }