I create an event object using a bit of base and underline as follows:
var appEvents = _.extend({}, Backbone.Events);
Then I try to create a function that will trigger console.log everything and any event raised by this object, no matter where, how or what listeners it has, but I don’t know how to do it. I'm still experimenting with Backbone.
I think using the listenTo method is the way to go ... but then again, I don't know how to implement this.
source
share