diff --git a/dom.js b/dom.js index 0252079..5aae612 100644 --- a/dom.js +++ b/dom.js @@ -294,7 +294,6 @@ NamedNodeMap.prototype = { }, setNamedItem(attr) { var oldAttr = this.getNamedItem(attr.name) - if (attr.name === "style") attr.value = CSSStyleDeclaration(attr.value).cssText this[attr.name] = attr return oldAttr }, @@ -303,6 +302,7 @@ NamedNodeMap.prototype = { , tagName = map.ownerElement.tagName , isXml = map.ownerElement.ownerDocument.contentType === "application/xml" return map.names().map(loName => { + if (loName === "style" && minify && map.ownerElement.style) {} // Access to style makes _style var attr = map.getNamedItem(loName) , name = attr.name , value = attr.value.replace(escRe, escFn) diff --git a/test/data/ui/index.html.snap b/test/data/ui/index.html.snap index c78d134..8d5825f 100644 --- a/test/data/ui/index.html.snap +++ b/test/data/ui/index.html.snap @@ -27,7 +27,7 @@ if (a > 12) throw "a <\!---->not <\!-- --> 12"
-