mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-23 11:37:38 +08:00
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:
committed by
Pete Bacon Darwin
parent
0bfa29377d
commit
f1b94b4b59
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user