From: Dave Methvin Date: Fri, 4 Jan 2013 22:33:16 +0000 (-0500) Subject: Fix #12945. Check for .getAttribute so IE9 is happy. X-Git-Tag: 1.9.0rc1~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a95f35744aff95a446cc05e1d8c558b3a4867836;p=jquery.git Fix #12945. Check for .getAttribute so IE9 is happy. --- 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 ?