single-file-core 1.0.39 → 1.0.40
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/.eslintrc.js +0 -0
- package/LICENSE +0 -0
- package/common/content-infobar-web.js +0 -0
- package/modules/css-fonts-alt-minifier.js +0 -0
- package/modules/css-fonts-minifier.js +0 -0
- package/modules/css-matched-rules.js +0 -0
- package/modules/css-medias-alt-minifier.js +0 -0
- package/modules/css-rules-minifier.js +0 -0
- package/modules/html-images-alt-minifier.js +0 -0
- package/modules/html-minifier.js +0 -0
- package/modules/html-serializer.js +0 -0
- package/modules/index.js +0 -0
- package/package.json +1 -1
- package/processors/frame-tree/content/content-frame-tree.js +0 -0
- package/processors/hooks/content/content-hooks-frames-web.js +0 -0
- package/processors/hooks/content/content-hooks-frames.js +0 -0
- package/processors/index.js +0 -0
- package/processors/lazy/content/content-lazy-loader.js +0 -0
- package/single-file-bootstrap.js +0 -0
- package/single-file-core.js +8 -6
- package/single-file-frames.js +0 -0
- package/single-file-helper.js +0 -0
- package/single-file-hooks-frames.js +0 -0
- package/single-file-infobar.js +0 -0
- package/single-file-util.js +0 -0
- package/single-file.js +0 -0
- package/vendor/css-font-property-parser.js +0 -0
- package/vendor/css-media-query-parser.js +0 -0
- package/vendor/css-minifier.js +0 -0
- package/vendor/css-tree.js +0 -0
- package/vendor/css-unescape.js +0 -0
- package/vendor/html-srcset-parser.js +0 -0
- package/vendor/index.js +0 -0
- package/vendor/mime-type-parser.js +0 -0
package/.eslintrc.js
CHANGED
|
File without changes
|
package/LICENSE
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/modules/html-minifier.js
CHANGED
|
File without changes
|
|
File without changes
|
package/modules/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/processors/index.js
CHANGED
|
File without changes
|
|
File without changes
|
package/single-file-bootstrap.js
CHANGED
|
File without changes
|
package/single-file-core.js
CHANGED
|
@@ -791,14 +791,16 @@ class Processor {
|
|
|
791
791
|
replaceInvalidElements() {
|
|
792
792
|
this.doc.querySelectorAll("template[" + util.INVALID_ELEMENT_ATTRIBUTE_NAME + "]").forEach(templateElement => {
|
|
793
793
|
const placeHolderElement = this.doc.createElement("span");
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
if (originalElement
|
|
797
|
-
|
|
794
|
+
if (templateElement.content) {
|
|
795
|
+
const originalElement = templateElement.content.firstChild;
|
|
796
|
+
if (originalElement) {
|
|
797
|
+
if (originalElement.hasAttributes()) {
|
|
798
|
+
Array.from(originalElement.attributes).forEach(attribute => placeHolderElement.setAttribute(attribute.name, attribute.value));
|
|
799
|
+
}
|
|
800
|
+
originalElement.childNodes.forEach(childNode => placeHolderElement.appendChild(childNode.cloneNode(true)));
|
|
798
801
|
}
|
|
799
|
-
|
|
802
|
+
templateElement.replaceWith(placeHolderElement);
|
|
800
803
|
}
|
|
801
|
-
templateElement.replaceWith(placeHolderElement);
|
|
802
804
|
});
|
|
803
805
|
}
|
|
804
806
|
|
package/single-file-frames.js
CHANGED
|
File without changes
|
package/single-file-helper.js
CHANGED
|
File without changes
|
|
File without changes
|
package/single-file-infobar.js
CHANGED
|
File without changes
|
package/single-file-util.js
CHANGED
|
File without changes
|
package/single-file.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/vendor/css-minifier.js
CHANGED
|
File without changes
|
package/vendor/css-tree.js
CHANGED
|
File without changes
|
package/vendor/css-unescape.js
CHANGED
|
File without changes
|
|
File without changes
|
package/vendor/index.js
CHANGED
|
File without changes
|
|
File without changes
|