From a95f35744aff95a446cc05e1d8c558b3a4867836 Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Fri, 4 Jan 2013 17:33:16 -0500 Subject: [PATCH] Fix #12945. Check for .getAttribute so IE9 is happy. --- src/attributes.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ? -- 2.39.5