]> source.dussan.org Git - jquery.git/commitdiff
Fix #12945. Check for .getAttribute so IE9 is happy.
authorDave Methvin <dave.methvin@gmail.com>
Fri, 4 Jan 2013 22:33:16 +0000 (17:33 -0500)
committerDave Methvin <dave.methvin@gmail.com>
Fri, 4 Jan 2013 22:33:16 +0000 (17:33 -0500)
src/attributes.js

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