examples/HTML StarterKit/lib/durandal/js/plugins/widget.js
function(kind) {
            ko.bindingHandlers[kind] = {
                init: function() {
                    return { controlsDescendantBindings: true };
                },
                update: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {
                    var settings = widget.getSettings(valueAccessor);
                    settings.kind = kind;
                    extractParts(element, settings);
                    widget.create(element, settings, bindingContext, true);
                }
            };

            ko.virtualElements.allowedBindings[kind] = true;
            composition.composeBindings.push(kind + ':');
        }
function(kind) {
            ko.bindingHandlers[kind] = {
                init: function() {
                    return { controlsDescendantBindings: true };
                },
                update: function(element, valueAccessor, allBindingsAccessor, viewModel, bindingContext) {
                    var settings = widget.getSettings(valueAccessor);
                    settings.kind = kind;
                    extractParts(element, settings);
                    widget.create(element, settings, bindingContext, true);
                }
            };

            ko.virtualElements.allowedBindings[kind] = true;
            composition.composeBindings.push(kind + ':');
        }
function ( kind ) { ko . bindingHandlers [ kind ] = { init : function ( ) { return { controlsDescendantBindings : true } ; } , update : function ( element , valueAccessor , allBindingsAccessor , viewModel , bindingContext ) { var settings = widget . getSettings ( valueAccessor ) ; settings . kind = kind ; extractParts ( element , settings ) ; widget . create ( element , settings , bindingContext , true ) ; } } ; ko . virtualElements . allowedBindings [ kind ] = true ; composition . composeBindings . push ( kind + ':' ) ; }
Creates a ko binding handler for the specified kind.
@method registerKind
@param {string} kind The kind to create a custom binding handler for.
Creates a ko binding handler for the specified kind .