Allow function to be specified as callback #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backbone events could be written inline.
This is useful for for cases where it doesn't quite make
sense to create a method just for them. Such as:
If the callback was just 'quack', it would be passed the Event object.
It can also be useful for adding events later in the view's lifecycle by calling
this.eventManager.bind() with a function that has closure scope.
My personal use case for it is to setup a listener on the form when it renders:
I prefer to use the eventManager vs setting up EventListeners on the element, since eventManager handles teardown on remove().