backbone.debug
backbone.debug copied to clipboard
Preserve original constructor name
This improves the debugging output since you can display the class name instead of just Model/View/Collection by adding a named constructor like this:
constructor: function MyModel() {
Backbone.Model.apply(this, arguments);
},
The debug output looks more like:
[instance] Model: MyModel:c6
This also improves compatibility with the Backbone-Debugger chrome extension.