rdy/backbone_extensions — pull request #2 by lukeasrodgers (2013-09-30 01:22:08+00:00)
Title: Refactor event delegation final

This PR refactors the event delegation module to use a more OO approach. It comes out with more LOC and is probably slower, but since I don't think this is (or should be) a very hot code path, I think (what I consider to be) the gains in readability offset these drawbacks.

But obviously if you prefer the existing style, that's fine. I was undertaking this refactor anyway for some other changes I'm making to this code, and thought I'd see if you were interested in the parts that leave functionality unchanged. Happy to discuss changes or squash into fewer commits, if you're interested.

In any case, you might be interested in cherry picking the first and last commits, which just change whitespace and add a spec that basically ensures Backbone.View#undelegateEvents is called.