|
|
@@ -423,8 +423,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
}
|
|
|
|
|
|
async frames(initialization) {
|
|
|
- let frameElements = this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]");
|
|
|
- frameElements = DomUtil.removeNoScriptFrames(frameElements);
|
|
|
+ const frameElements = Array.from(this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]"));
|
|
|
await Promise.all(frameElements.map(async (frameElement, frameIndex) => {
|
|
|
const frameWindowId = (this.options.windowId || "0") + "." + frameIndex;
|
|
|
const frameData = this.options.framesData.find(frame => frame.windowId == frameWindowId);
|
|
|
@@ -456,8 +455,7 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
}
|
|
|
|
|
|
async htmlImports(initialization) {
|
|
|
- let linkElements = this.doc.querySelectorAll("link[rel=import][href]");
|
|
|
- linkElements = DomUtil.removeNoScriptFrames(linkElements);
|
|
|
+ const linkElements = Array.from(this.doc.querySelectorAll("link[rel=import][href]"));
|
|
|
if (!this.relImportProcessors) {
|
|
|
this.relImportProcessors = new Map();
|
|
|
}
|
|
|
@@ -724,16 +722,6 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- static removeNoScriptFrames(frameElements) {
|
|
|
- return Array.from(frameElements).filter(element => {
|
|
|
- element = element.parentElement;
|
|
|
- while (element && element.tagName != "NOSCRIPT") {
|
|
|
- element = element.parentElement;
|
|
|
- }
|
|
|
- return !element;
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
}
|
|
|
|
|
|
return { getClass };
|