1
0
Эх сурвалжийг харах

call stop on windows before retrieving contents

Gildas 7 жил өмнө
parent
commit
26ae2bccd6

+ 2 - 0
lib/single-file/frame-tree.js

@@ -45,6 +45,7 @@ this.frameTree = this.frameTree || (() => {
 		if (typeof event.data == "string" && event.data.startsWith(MESSAGE_PREFIX)) {
 			const message = JSON.parse(event.data.substring(MESSAGE_PREFIX.length));
 			if (message.method == INIT_REQUEST_MESSAGE) {
+				window.stop();
 				initRequest(message);
 			} else if (message.method == INIT_RESPONSE_MESSAGE) {
 				const port = event.ports[0];
@@ -158,6 +159,7 @@ this.frameTree = this.frameTree || (() => {
 			const frameDoc = frameElement.contentDocument;
 			if (frameDoc) {
 				try {
+					frameElement.contentWindow.stop();
 					processFrames(frameDoc.querySelectorAll(FRAMES_CSS_SELECTOR), options, windowId, sessionId);
 					framesData.push(getFrameData(frameDoc, frameElement.contentWindow, windowId, options));
 				} catch (error) {