gaffa-tape / gaffa

Model driven JavaScript application framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggest passing through event details for captured DOM events

DamonOehlman opened this issue · comments

Passing through evt as scope for triggerActions would be really helpful...

Modified View to the following which allowed me to stopPropagation on an event where it was appropriate:

    View.prototype.bind = function(){
        var view = this;

        ViewItem.prototype.bind.apply(this, arguments);
        this.forEachChild(function(child){
            child.bind();
        });
        for(var key in this.actions){
            var actions = this.actions[key];

            gaffa.doc.on(key, this.renderedElement, function (evt) {
                triggerActions(actions, view, evt);
            });
        }
    };