Closed Fab1en closed 11 years ago
Callbacks are defined by function names (string) :
states: { visible: {enter: ['doShow'], leave: ['doHide']}, }, doShow: function() { this.el.show(); }, doHide: function() { this.el.hide(); }
Sometimes, when the callbacks are short, it's easier to use anonymous functions :
states: { visible: { enter: [function() { this.el.show(); }], leave: [function() { this.el.hide(); }] }, }
This should be easy, but your _collectMethods prevent the use of anonymous functions. You can define anonymous function as callbacks in Vanilla Backbone events hash.
_collectMethods
Merged!
Callbacks are defined by function names (string) :
Sometimes, when the callbacks are short, it's easier to use anonymous functions :
This should be easy, but your
_collectMethods
prevent the use of anonymous functions. You can define anonymous function as callbacks in Vanilla Backbone events hash.