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
avoids jQuery's event system when binding on observes which fixes #280 #517
added a commit
this pull request
Oct 28, 2013
A session isn't likely necessary for this one.
jQuery does a lot of special things when registering an event listener: https://github.com/bitovi/canjs/blob/master/lib/jquery.1.9.1.js#L2721
For example, it handles special events, event delegation, namespaces, events on HTMLElements.
Our addEvent does far less:
It basically pushes the handler on an array.
There's a LOT of event binding going on when you render 200 items in TodoMVC. It was the dominate part of the runtime. We replaced the observable event binding with something MUCH faster.