|
@@ -100,6 +100,13 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
|
|
|
if (doc.head) {
|
|
if (doc.head) {
|
|
|
doc.head.querySelectorAll("*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)").forEach(element => element.hidden = true);
|
|
doc.head.querySelectorAll("*:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)").forEach(element => element.hidden = true);
|
|
|
}
|
|
}
|
|
|
|
|
+ doc.querySelectorAll("svg foreignObject").forEach(element => {
|
|
|
|
|
+ const flowElements = element.querySelectorAll("html > head > *:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title), html > body > *:not(base):not(link):not(meta):not(noscript):not(script):not(style):not(template):not(title)");
|
|
|
|
|
+ if (flowElements.length) {
|
|
|
|
|
+ Array.from(element.childNodes).forEach(node => node.remove());
|
|
|
|
|
+ flowElements.forEach(flowElement => element.appendChild(flowElement));
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
let elementsInfo;
|
|
let elementsInfo;
|
|
|
if (win && doc.documentElement) {
|
|
if (win && doc.documentElement) {
|
|
|
elementsInfo = getElementsInfo(win, doc, doc.documentElement, options);
|
|
elementsInfo = getElementsInfo(win, doc, doc.documentElement, options);
|