init メソッドでフォーカスとぼかしの動作を設定するカスタム バインディングを作成しています。それ以外の場合は、このカスタム バインディングがネイティブの Knockout 値バインディングとまったく同じように動作することを望みます。
ko.bindingHandlers.currencyValue = {
init: function (element, valueAccessor) {
$(element).focus(function () {
//focus behavior here...
});
$(element).blur(function () {
//blur behavior here...
});
//what do I put here to get the native value binding behavior?
},
update: function (element, valueAccessor) {
//what do I put here to get the native value binding behavior?
}