foo
bar
diff --git a/remote/domains/content/DOM.jsm b/remote/domains/content/DOM.jsm index f52dfb518463..a771dfbffb15 100644 --- a/remote/domains/content/DOM.jsm +++ b/remote/domains/content/DOM.jsm @@ -78,6 +78,11 @@ class DOM extends ContentProcessDomain { } } + let context = this.docShell.browsingContext; + if (unsafeObj instanceof HTMLIFrameElement) { + context = unsafeObj.contentWindow.docShell.browsingContext; + } + const node = { nodeId: debuggerObj.nodeId, backendNodeId: debuggerObj.nodeId, @@ -87,7 +92,7 @@ class DOM extends ContentProcessDomain { nodeValue: unsafeObj.nodeValue ? unsafeObj.nodeValue.toString() : "", childNodeCount: unsafeObj.childElementCount, attributes: attributes.length > 0 ? attributes : undefined, - frameId: this.docShell.browsingContext.id.toString(), + frameId: context.id.toString(), }; return { node }; diff --git a/remote/test/browser/dom/browser_describeNode.js b/remote/test/browser/dom/browser_describeNode.js index bb354ae6ab46..931b908dfd21 100644 --- a/remote/test/browser/dom/browser_describeNode.js +++ b/remote/test/browser/dom/browser_describeNode.js @@ -4,6 +4,7 @@ "use strict"; const DOC = toDataURL("
foo
bar