diff --git a/vendors/knockout/src/binding/bindingAttributeSyntax.js b/vendors/knockout/src/binding/bindingAttributeSyntax.js index bf0f9d4bc..d86aeb3e2 100644 --- a/vendors/knockout/src/binding/bindingAttributeSyntax.js +++ b/vendors/knockout/src/binding/bindingAttributeSyntax.js @@ -104,7 +104,7 @@ ko.bindingContext = class { // But this does not mean that the $data value of the child context will also get updated. If the child // view model also depends on the parent view model, you must provide a function that returns the correct // view model on each update. - 'createChildContext'(dataItemOrAccessor, options) { + createChildContext(dataItemOrAccessor, options) { return new ko.bindingContext(dataItemOrAccessor, this, (self, parentContext) => { // Extend the context hierarchy by setting the appropriate pointers self['$parentContext'] = parentContext; diff --git a/vendors/knockout/src/binding/defaultBindings/ifIfnotWith.js b/vendors/knockout/src/binding/defaultBindings/ifIfnotWith.js index c124b250e..dde5fbdb9 100644 --- a/vendors/knockout/src/binding/defaultBindings/ifIfnotWith.js +++ b/vendors/knockout/src/binding/defaultBindings/ifIfnotWith.js @@ -26,7 +26,7 @@ function makeWithIfBinding(bindingKey, isWith, isNot) { contextOptions['dataDependency'] = ko.dependencyDetection.computed(); childContext = isWith - ? bindingContext['createChildContext'](typeof value == "function" ? value : valueAccessor, contextOptions) + ? bindingContext.createChildContext(typeof value == "function" ? value : valueAccessor, contextOptions) : (ko.dependencyDetection.getDependenciesCount() ? bindingContext['extend'](null, contextOptions) : bindingContext diff --git a/vendors/knockout/src/components/componentBinding.js b/vendors/knockout/src/components/componentBinding.js index a180e777f..889942101 100644 --- a/vendors/knockout/src/components/componentBinding.js +++ b/vendors/knockout/src/components/componentBinding.js @@ -61,7 +61,7 @@ 'element': element, 'templateNodes': originalChildNodes }); - ko.applyBindingsToDescendants(asyncContext['createChildContext'](currentViewModel, { + ko.applyBindingsToDescendants(asyncContext.createChildContext(currentViewModel, { 'extend': ctx => { ctx['$component'] = currentViewModel; ctx['$componentTemplateNodes'] = originalChildNodes; diff --git a/vendors/knockout/src/templating/templating.js b/vendors/knockout/src/templating/templating.js index e394b42fb..55154ea9f 100644 --- a/vendors/knockout/src/templating/templating.js +++ b/vendors/knockout/src/templating/templating.js @@ -122,7 +122,7 @@ // This will be called by setDomNodeChildrenFromArrayMapping to get the nodes to add to targetNode var executeTemplateForArrayItem = (arrayValue, index) => { // Support selecting template as a function of the data being rendered - arrayItemContext = parentBindingContext['createChildContext'](arrayValue, { + arrayItemContext = parentBindingContext.createChildContext(arrayValue, { 'extend': context => context['$index'] = index }); @@ -247,7 +247,7 @@ // Render once for this single data point (or use the viewModel if no data was provided) var innerBindingContext = bindingContext; if ('data' in options) { - innerBindingContext = bindingContext['createChildContext'](options['data'], { + innerBindingContext = bindingContext.createChildContext(options['data'], { 'exportDependencies': true }); }