]> source.dussan.org Git - jquery.git/commitdiff
Ref #12945, IE9/10 still needs safe .getAttribute check.
authorDave Methvin <dave.methvin@gmail.com>
Sat, 5 Jan 2013 03:29:27 +0000 (22:29 -0500)
committerDave Methvin <dave.methvin@gmail.com>
Sat, 5 Jan 2013 03:29:27 +0000 (22:29 -0500)
src/attributes.js

index bd6c20e7b4450e5ea4d44dcceedcef4bb1b83272..fd40f0018f2fba0a595445a8eec44274ada70f7c 100644 (file)
@@ -329,7 +329,9 @@ jQuery.extend({
 
                        // In IE9+, Flash objects don't have .getAttribute (#12945)
                        // Support: IE9+
-                       ret = elem.getAttribute && elem.getAttribute( name );
+                       if ( typeof elem.getAttribute !== "undefined" ) {
+                               ret =  elem.getAttribute( name );
+                       }
 
                        // Non-existent attributes return null, we normalize to undefined
                        return ret == null ?