arturadib / agility

Javascript MVC for the "write less, do more" programmer
http://agilityjs.com
MIT License
542 stars 70 forks source link

Multi-event controller binding #86

Closed pindia closed 12 years ago

pindia commented 12 years ago

Allows a controller method to bind to multiple events with comma-separation as per #22.

arturadib commented 12 years ago

Thanks, Pindi, I like it!

Would you mind adding a few more tests including events with selectors? For example, click button#one, click button#two, etc, just to make sure the lexing/parsing is done correctly?

pindia commented 12 years ago

While testing additional selector types, I realized that the comma delimitation clashes with jQuery's comma selector for multiple elements. While a binding of the form click #button1,#button2 can be rewritten to click #button1, click#button2, this change would subtly break existing code, so I've changed the delimiter character to a semicolon.

arturadib commented 12 years ago

Superb, thanks Pindi!