aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVojta Jina2011-07-08 13:16:51 +0200
committerIgor Minar2011-07-12 23:04:46 -0700
commitce80576e0b8ac9ed5a5b1f1a4dbc2446434a0002 (patch)
tree0ffa65d9f7bdbf6d04c93c1509c25e3465613a78 /test
parent10da625ed93511dbf5d4e61ca4e42f6f2d478959 (diff)
downloadangular.js-ce80576e0b8ac9ed5a5b1f1a4dbc2446434a0002.tar.bz2
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.
Diffstat (limited to 'test')
-rw-r--r--test/jqLiteSpec.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js
index 2c05a7e5..c920a250 100644
--- a/test/jqLiteSpec.js
+++ b/test/jqLiteSpec.js
@@ -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');
+ });
});