Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support an existing 'events' function attribute #51
I occasionally define 'events' as a method on a view (instead of a hash):
class SampleView extends Backbone.View events: -> click: -> alert 'Clicked!'
Backbone supports this but when I tried to use stickit to bind to a form field the field events were never added to 'events' because 'events' was a function and not a hash. This pull requests adds support for an 'events' function. I added tests for this new case as well as the 'events as hash' case.
Thank you for stickit - I'm looking forward to using it more and contributing where I can!