aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2013-04-18 13:43:51 -0400
committerTimmy Willison <timmywillisn@gmail.com>2013-04-18 13:51:12 -0400
commit3ef7a9683b95fa334ab75458a531bb263782c748 (patch)
tree6f2f82c1b6f215c7698968e72df23cbe27f60861
parent9d16fe6283667396094d49559a37fc672c06252c (diff)
downloadjquery-3ef7a9683b95fa334ab75458a531bb263782c748.tar.gz
jquery-3ef7a9683b95fa334ab75458a531bb263782c748.zip
Remove unnecessary usage of getAttributeNode(). Fixes #12072.
-rw-r--r--src/manipulation.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index f37ec421a..2cc6d8e20 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -485,8 +485,7 @@ function manipulationTarget( elem, content ) {
// Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) {
- var attr = elem.getAttributeNode("type");
- elem.type = ( attr && attr.specified ) + "/" + elem.type;
+ elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
return elem;
}
function restoreScript( elem ) {