From 3ef7a9683b95fa334ab75458a531bb263782c748 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Thu, 18 Apr 2013 13:43:51 -0400 Subject: [PATCH] Remove unnecessary usage of getAttributeNode(). Fixes #12072. --- src/manipulation.js | 3 +-- 1 file changed, 1 insertion(+), 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 ) { -- 2.39.5