diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2013-01-04 17:33:16 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2013-01-04 17:33:16 -0500 |
commit | a95f35744aff95a446cc05e1d8c558b3a4867836 (patch) | |
tree | 50517418398c7e0c38cb631fc7d6ba9be0aa9454 /src | |
parent | abead1c86b75d376544e52cd916031a67caf2c34 (diff) | |
download | jquery-a95f35744aff95a446cc05e1d8c558b3a4867836.tar.gz jquery-a95f35744aff95a446cc05e1d8c558b3a4867836.zip |
Fix #12945. Check for .getAttribute so IE9 is happy.
Diffstat (limited to 'src')
-rw-r--r-- | src/attributes.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/attributes.js b/src/attributes.js index 4193bbffb..754a35e87 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -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 ? |