Skip to content
Permalink
Browse files

Ref #12945, IE9/10 still needs safe .getAttribute check.

  • Loading branch information...
dmethvin committed Jan 5, 2013
1 parent e9ab6a7 commit c0241a47e270cd0e0ac2b2a0fdefc5a3a15b5ae6
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/attributes.js
@@ -329,7 +329,9 @@ jQuery.extend({

// In IE9+, Flash objects don't have .getAttribute (#12945)
// Support: IE9+
ret = elem.getAttribute && elem.getAttribute( name );

This comment has been minimized.

@dmethvin

dmethvin Jan 5, 2013

Author Member

This worked fine for me locally with IE9, but failed two tests that used XML in TestSwarm. So I had to go back to the slightly longer method being used in 1.9.

if ( typeof elem.getAttribute !== "undefined" ) {
ret = elem.getAttribute( name );
}

// Non-existent attributes return null, we normalize to undefined
return ret == null ?

0 comments on commit c0241a4

Please sign in to comment.
You can’t perform that action at this time.