kaman.functions.js
function kappInit(subject, callback) {

    //if expose option is added we expose this view
    console.log("kappInit:", subject)
    if (subject.getOption("expose_as")) {
        console.log("kappInit: found exposeAs option " + subject.getOption("expose_as"))
        subject.exposeAs(subject.getOption("expose_as"))

    }

    //as backbone has its owne method to bind a model and collections to views we just
    //avoid to merge it to the object atributes by this way
    omitBackboneOptsAsProps(subject, ['model', 'collection'])
    //giving the replaceable regions to the view
    if (typeof subject._addReplaceableRegions === "function") {
        subject._addReplaceableRegions();
    };

    if (typeof callback === "function") {
        callback()
    }


}
function kappInit(subject, callback) {

    //if expose option is added we expose this view
    console.log("kappInit:", subject)
    if (subject.getOption("expose_as")) {
        console.log("kappInit: found exposeAs option " + subject.getOption("expose_as"))
        subject.exposeAs(subject.getOption("expose_as"))

    }

    //as backbone has its owne method to bind a model and collections to views we just
    //avoid to merge it to the object atributes by this way
    omitBackboneOptsAsProps(subject, ['model', 'collection'])
    //giving the replaceable regions to the view
    if (typeof subject._addReplaceableRegions === "function") {
        subject._addReplaceableRegions();
    };

    if (typeof callback === "function") {
        callback()
    }


}
function kappInit ( subject , callback ) { //if expose option is added we expose this view console . log ( "kappInit:" , subject ) if ( subject . getOption ( "expose_as" ) ) { console . log ( "kappInit: found exposeAs option " + subject . getOption ( "expose_as" ) ) subject . exposeAs ( subject . getOption ( "expose_as" ) ) } //as backbone has its owne method to bind a model and collections to views we just //avoid to merge it to the object atributes by this way omitBackboneOptsAsProps ( subject , [ 'model' , 'collection' ] ) //giving the replaceable regions to the view if ( typeof subject . _addReplaceableRegions === "function" ) { subject . _addReplaceableRegions ( ) ; } ; if ( typeof callback === "function" ) { callback ( ) } }
you got to bind view object to this function
@param {function} callback
you got to bind view object to this function