Remove unnecessary usage of getAttributeNode(). Fixes #12072.

This commit is contained in:
Timmy Willison 2013-04-18 13:43:51 -04:00
parent 9d16fe6283
commit 3ef7a9683b

View File

@ -485,8 +485,7 @@ function manipulationTarget( elem, content ) {
// Replace/restore the type attribute of script elements for safe DOM manipulation // Replace/restore the type attribute of script elements for safe DOM manipulation
function disableScript( elem ) { function disableScript( elem ) {
var attr = elem.getAttributeNode("type"); elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
elem.type = ( attr && attr.specified ) + "/" + elem.type;
return elem; return elem;
} }
function restoreScript( elem ) { function restoreScript( elem ) {