feat(jqLite): switch bind/unbind to more recent jQuery on/off

jQuery switched to a completely new event binding implementation as of
1.7.0, centering around on/off methods instead of previous bind/unbind.
This patch makes jqLite match this implementation while still supporting
previous bind/unbind methods.
This commit is contained in:
Michał Gołębiowski
2013-06-19 20:52:50 +01:00
committed by Pete Bacon Darwin
parent 0bfa29377d
commit f1b94b4b59
30 changed files with 154 additions and 119 deletions

View File

@@ -14,8 +14,8 @@ if (window.jQuery) {
spy1 = jasmine.createSpy('span1.$destroy');
spy2 = jasmine.createSpy('span2.$destroy');
doc = $('<div><span class=first>abc</span><span class=second>xyz</span></div>');
doc.find('span.first').bind('$destroy', spy1);
doc.find('span.second').bind('$destroy', spy2);
doc.find('span.first').on('$destroy', spy1);
doc.find('span.second').on('$destroy', spy2);
});
afterEach(function() {