Type of cross-origin iframe's "contentWindow" property is shown as "Object" and not "Window"
Categories
(DevTools :: Console, defect, P3)
Tracking
(firefox123 fixed)
Tracking | Status | |
---|---|---|
firefox123 | --- | fixed |
People
(Reporter: whimboo, Assigned: nchevobbe)
References
Details
Attachments
(2 files)
I would expect to see Window
as type for the contentWindow
property nevertheless if it's a same-origin or cross-origin iframe. While for the former it's true the latter shows Object
instead. See the screenshot.
Steps:
- Goto https://mathiasbynens.github.io/css-dbg-stories/iframe-navigations.html
- Click:
Append iframe with a cross-origin URL
- Open the inspector, find the
iframe
element and use it in the console - Check it's
.contentWindow
property
Instead of Window
the type is shown as Object
.
I assume that for the type detection you are not checking with Window.isInstance()
but maybe just do a class name check? At least that is also the problem in our WebDriver BiDi implementation that we need to fix (bug 1867667).
Updated•2 years ago
|
Updated•2 years ago
|
Comment 1•2 years ago
|
||
The component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 2•2 years ago
|
||
(let's put it in console since it's related to ObjectActor)
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Assignee | ||
Comment 4•2 years ago
|
||
I filed Bug 1869815 to fix the "Object" to "Window" part, but this also highlighted another issue.
We're trying to retrieve the URL of the window through location.href
, which does throw with a cross-process iframe contentWindow.
In such case, we can retrieve the information through the browsingContext embedder
Comment 6•2 years ago
|
||
bugherder |
Description
•