beCodeMyFriend / Cuore.js

Other
34 stars 13 forks source link

The bus must dispatch different params object for each subscriber #15

Closed elmendalerenda closed 12 years ago

elmendalerenda commented 12 years ago

var emit = function(eventName, params) { var subscribersList = this.subscribers(eventName);

        debug("Bus.emit (event, params)");
        debug(eventName);
        debug(params);
        debug("------------");

        for (var i = 0, len = subscribersList.length; i < len; i++) {
            subscribersList[i].eventDispatch(eventName, params);
        }
    };