mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-27 18:18:28 +08:00
KnockoutJS drop unused $parentContext
and $parents
This commit is contained in:
parent
766d3eaa98
commit
ca170f2461
1 changed files with 0 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue