|
|
@@ -152,13 +152,13 @@ this.frameTree = this.frameTree || (() => {
|
|
|
}
|
|
|
}
|
|
|
function processFrames(doc, frameElements, options, parentWindowId, sessionId) {
|
|
|
- processFramesAsync(frameElements, options, parentWindowId, sessionId);
|
|
|
+ processFramesAsync(doc, frameElements, options, parentWindowId, sessionId);
|
|
|
if (frameElements.length) {
|
|
|
processFramesSync(doc, frameElements, options, parentWindowId, sessionId);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- function processFramesAsync(frameElements, options, parentWindowId, sessionId) {
|
|
|
+ function processFramesAsync(doc, frameElements, options, parentWindowId, sessionId) {
|
|
|
const framesData = [];
|
|
|
frameElements.forEach((frameElement, frameIndex) => {
|
|
|
const windowId = parentWindowId + WINDOW_ID_SEPARATOR + frameIndex;
|
|
|
@@ -171,7 +171,8 @@ this.frameTree = this.frameTree || (() => {
|
|
|
}
|
|
|
setTimeout(() => sendInitResponse({ framesData: [{ windowId, processed: true }], sessionId }), TIMEOUT_INIT_REQUEST_MESSAGE);
|
|
|
});
|
|
|
- sendInitResponse({ framesData, sessionId });
|
|
|
+ sendInitResponse({ framesData, sessionId, requestedFrameId: doc.documentElement.dataset.requestedFrameId && parentWindowId });
|
|
|
+ delete document.documentElement.dataset.requestedFrameId;
|
|
|
}
|
|
|
|
|
|
function processFramesSync(doc, frameElements, options, parentWindowId, sessionId) {
|