@litejs/dom 26.4.1 → 26.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dom.js +3 -2
- package/package.json +1 -1
package/dom.js
CHANGED
|
@@ -464,9 +464,10 @@ extendNode(HTMLElement, Element, {
|
|
|
464
464
|
var attrs = this.attributes.toString(minify)
|
|
465
465
|
, isXml = this.ownerDocument.contentType === "application/xml"
|
|
466
466
|
, voidEl = this.ownerDocument.documentElement.tagName === "svg" ? svgVoidElements : voidElements
|
|
467
|
-
|
|
467
|
+
, content = voidEl[this.tagName] ? null : Node.toString.call(this, minify)
|
|
468
|
+
return minify && this.tagName === "STYLE" && !content.trim() ? "" : "<" + this.localName +
|
|
468
469
|
(attrs ? " " + (attrs.slice(-1) === "/" ? attrs + " " : attrs) : "") +
|
|
469
|
-
(voidEl[this.tagName] ? (isXml ? "/>" : ">") : ">" +
|
|
470
|
+
(voidEl[this.tagName] ? (isXml ? "/>" : ">") : ">" + content + "</" + this.localName + ">")
|
|
470
471
|
}
|
|
471
472
|
})
|
|
472
473
|
|
package/package.json
CHANGED