I am using knockout with ASP.NET MVC for some project.
I am using the following bindingHandler
of knockout
ko.bindingHandlers.select2 = {
after: ["options", "value", "selectedOptions"],
init: function (el, valueAccessor, allBindingsAccessor, viewModel) {
// no explicit reference to the 'after' variable
},
update: function (el, valueAccessor, allBindingsAccessor, viewModel) {
// no explicit reference to the 'after' variable
}
}
I got this code from this question and I modified it little.
It is basically a custom binding handler
for the Select2 plugin.
Question
I just want to know what the after: ["options", "value", "selectedOptions"],
means here. There is no reference to this variable anywhere in the init
or update
functions.
Does this variable have any meaning in this context? or is this an instruction to knockout to make it execute this custom binding after finish executing [options
, value
, selectedOptions
] bindings?
Note the documentation of the custom binding mentions nothing about this variable.