single-file-core 1.2.15 → 1.2.16
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/core/index.js +5 -1
- package/package.json +1 -1
package/core/index.js
CHANGED
|
@@ -588,7 +588,11 @@ class Processor {
|
|
|
588
588
|
}
|
|
589
589
|
|
|
590
590
|
preProcessPage() {
|
|
591
|
-
this.doc.body.querySelectorAll(":not(svg) title, meta, link[href][rel*=\"icon\"]").forEach(element =>
|
|
591
|
+
this.doc.body.querySelectorAll(":not(svg) title, meta, link[href][rel*=\"icon\"]").forEach(element => {
|
|
592
|
+
if ((this.options.win && element instanceof this.options.win.HTMLElement) || element instanceof globalThis.HTMLElement) {
|
|
593
|
+
this.doc.head.appendChild(element);
|
|
594
|
+
}
|
|
595
|
+
});
|
|
592
596
|
if (this.options.images && !this.options.saveRawPage) {
|
|
593
597
|
this.doc.querySelectorAll("img[" + util.IMAGE_ATTRIBUTE_NAME + "]").forEach(imgElement => {
|
|
594
598
|
const attributeValue = imgElement.getAttribute(util.IMAGE_ATTRIBUTE_NAME);
|