I've found an unusual code, but I don't understand how to call this custom binding function and how is that supposed to work. So here is my code:
ViewModel:
ko.bindingHandlers.test = function ($) {
return {
init: function (el, valueAccessor, bindingsAccessor, viewModel) {
},
update: function (el, valueAccessor, bindingsAccessor, viewModel) {
}
}
}
View:
<input type="text" data-bind="test: ???, value: 0, settings: { test: 'test-value' }">