From 986608fe763482c79dfd0338e5041e5e673fec9f Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 1 Sep 2011 02:37:32 -0700 Subject: fix(jqLite): special-case attr('class') because of IE9 bug --- test/jqLiteSpec.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/jqLiteSpec.js b/test/jqLiteSpec.js index c06fcae4..b75289bb 100644 --- a/test/jqLiteSpec.js +++ b/test/jqLiteSpec.js @@ -168,6 +168,15 @@ describe('jqLite', function(){ var elm = jqLite('
a
'); expect(elm.attr('non-existing')).toBeUndefined(); }); + + it('should special-case "class" attribute', function() { + // stupid IE9 returns null for element.getAttribute('class') when element has ng:class attr + var elm = jqLite('
a
'); + expect(elm.attr('class')).toBe(' any '); + + elm.attr('class', 'foo bar'); + expect(elm.attr('class')).toBe('foo bar'); + }); }); -- cgit v1.2.3