examples/HTML StarterKit/lib/durandal/js/plugins/widget.js
function(element, settings, bindingContext, fromBinding) {
            if(!fromBinding){
                settings = widget.getSettings(function() { return settings; }, element);
            }

            var compositionSettings = widget.createCompositionSettings(element, settings);

            composition.compose(element, compositionSettings, bindingContext);
        }
function(element, settings, bindingContext, fromBinding) {
            if(!fromBinding){
                settings = widget.getSettings(function() { return settings; }, element);
            }

            var compositionSettings = widget.createCompositionSettings(element, settings);

            composition.compose(element, compositionSettings, bindingContext);
        }
function ( element , settings , bindingContext , fromBinding ) { if ( ! fromBinding ) { settings = widget . getSettings ( function ( ) { return settings ; } , element ) ; } var compositionSettings = widget . createCompositionSettings ( element , settings ) ; composition . compose ( element , compositionSettings , bindingContext ) ; }
Creates a widget.
@method create
@param {DOMElement} element The DOMElement or knockout virtual element that serves as the target element for the widget.
@param {object} settings The widget settings.
@param {object} [bindingContext] The current binding context.
Creates a widget .