|
|
@@ -129,7 +129,13 @@ this.frameTree = this.frameTree || (() => {
|
|
|
const windowId = parentWindowId + WINDOW_ID_SEPARATOR + frameIndex;
|
|
|
frameElement.setAttribute(docHelper.windowIdAttributeName(options.sessionId), windowId);
|
|
|
framesData.push({ windowId });
|
|
|
- if (!frameElement.contentDocument) {
|
|
|
+ let contentDocument;
|
|
|
+ try {
|
|
|
+ contentDocument = frameElement.contentDocument;
|
|
|
+ } catch (error) {
|
|
|
+ // ignored
|
|
|
+ }
|
|
|
+ if (!contentDocument) {
|
|
|
try {
|
|
|
sendMessage(frameElement.contentWindow, { method: INIT_REQUEST_MESSAGE, windowId, sessionId, options });
|
|
|
} catch (error) {
|