From: Dave Methvin Date: Sat, 5 Jan 2013 03:29:27 +0000 (-0500) Subject: Ref #12945, IE9/10 still needs safe .getAttribute check. X-Git-Tag: 2.0.0b1~37 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c0241a47e270cd0e0ac2b2a0fdefc5a3a15b5ae6;p=jquery.git Ref #12945, IE9/10 still needs safe .getAttribute check. --- diff --git a/src/attributes.js b/src/attributes.js index bd6c20e7b..fd40f0018 100644 --- a/src/attributes.js +++ b/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 ); + if ( typeof elem.getAttribute !== "undefined" ) { + ret = elem.getAttribute( name ); + } // Non-existent attributes return null, we normalize to undefined return ret == null ?