Skip to content

Instantly share code, notes, and snippets.

@julesbou
Created March 11, 2016 17:15
Show Gist options
  • Save julesbou/a07ca6673923549f4c63 to your computer and use it in GitHub Desktop.
Save julesbou/a07ca6673923549f4c63 to your computer and use it in GitHub Desktop.
Backbone.Collection.prototype.debugEvents =
Backbone.Model.prototype.debugEvents =
Backbone.View.prototype.debugEvents =
Backbone.Router.prototype.debugEvents = function() {
this.on('all', function(eventName) {
console.log('event “' + eventName + '” with ', Array.prototype.slice.call(arguments, 1));
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment