|
@@ -949,7 +949,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async resolveFrameURLs() {
|
|
async resolveFrameURLs() {
|
|
|
- if (!this.options.saveRawPage && this.options.frames) {
|
|
|
|
|
|
|
+ if (!this.options.saveRawPage) {
|
|
|
const frameElements = Array.from(this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]"));
|
|
const frameElements = Array.from(this.doc.querySelectorAll("iframe, frame, object[type=\"text/html\"][data]"));
|
|
|
await Promise.all(frameElements.map(async frameElement => {
|
|
await Promise.all(frameElements.map(async frameElement => {
|
|
|
if (frameElement.tagName == "OBJECT") {
|
|
if (frameElement.tagName == "OBJECT") {
|
|
@@ -960,7 +960,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
}
|
|
}
|
|
|
Array.from(frameElement.childNodes).forEach(node => node.remove());
|
|
Array.from(frameElement.childNodes).forEach(node => node.remove());
|
|
|
const frameWindowId = frameElement.getAttribute(util.WIN_ID_ATTRIBUTE_NAME);
|
|
const frameWindowId = frameElement.getAttribute(util.WIN_ID_ATTRIBUTE_NAME);
|
|
|
- if (frameWindowId) {
|
|
|
|
|
|
|
+ if (this.options.frames && frameWindowId) {
|
|
|
const frameData = this.options.frames.find(frame => frame.windowId == frameWindowId);
|
|
const frameData = this.options.frames.find(frame => frame.windowId == frameWindowId);
|
|
|
if (frameData) {
|
|
if (frameData) {
|
|
|
await initializeProcessor(frameData, frameElement, frameWindowId, this.batchRequest, Object.create(this.options));
|
|
await initializeProcessor(frameData, frameElement, frameWindowId, this.batchRequest, Object.create(this.options));
|