2 ms·
This should actually only take you 2 minutes if you'd like to keep the old behavior ... regardless of how many View classes you happen to have in your app. For
by jashkenas 13y ago
This should actually only take you 2 minutes if you'd like to keep the old behavior ... regardless of how many View classes you happen to have in your app. For example:
var originalView = Backbone.View;
Backbone.View = function(options) {
var instance = new originalView(options);
instance.options = options;
return instance;
};
Ahh..., isn't JavaScript just a lovely thing ;)
- byroot 13y agoSure you can hack things up like that. But when you use and update a library, you don't want to rely on deprecated behaviors.