Whitespace formatting: fixing indentation of an `if` block.
Using new EventDelegator object to handle event delegation.
New event handler objects to do actual event binding/unbinding.
Refactoring bindModelEvents function, renaming it.
Not sure about the new name, `bindCustomEvents`, but since this method
works for jQuery objects, and other Backbone objects that can trigger
events, this makes a bit more sense, I think.
Better name for method to prevent duplicate event delegation.
More verbose, but explains why this method is called here.
Refactoring undelegateEvents method to use an EventUndelegator object.
Getting rid of some local variables, unneeded `this`s.
Inlining `isJquery` method.
Adding a spec that fails when Backbone.View#undelegateEvents not called.
Renaming `modelEvents` -> `customBindings`.
Remove jQuery binding.
Can no longer pass [$el, 'click', fn] style arguments to
delegateEvents. We could always re-introduce this, but I think it
probably encourages an anti-pattern, i.e. views binding events to
things other than their own element.
Use `listenTo` and `stopListening` for event delegation.
Can no longer pass a context to these bindings, but that's probably an
anti-pattern anyway.
Do not check for _.singularize before calling it.
If _.singularize isn't there, it should not silently fail, since
failure here will cause some functionality to break.