fix:jqLite: Set event.target on IE<8

IE<8's Event has not target property - it has srcElement property.
Fix that to be consistent as jQuery.
This commit is contained in:
Vojta Jina
2011-07-08 13:16:51 +02:00
committed by Igor Minar
parent 10da625ed9
commit ce80576e0b
2 changed files with 12 additions and 0 deletions

View File

@@ -352,6 +352,15 @@ describe('jqLite', function(){
expect(callback).toHaveBeenCalled();
expect(callback.callCount).toBe(1);
});
it('should set event.target on IE', function() {
var elm = jqLite(a);
elm.bind('click', function(event) {
expect(event.target).toBe(a);
});
browserTrigger(a, 'click');
});
});