Support finding iframe elements by browsing context id #794
Labels
module-browsingContext
Browsing Context module
needs-discussion
Issues to be discussed by the working group
Puppeteer offers a way to get the frame owner element using the browsing context/navigable ID via the
Frame.frameElement()
API. Currently, the implementation in Puppeteer relies on finding all iframe/frame elements, serializing their contentWindow and comparing the ID of the serialized window to the id of the target frame. That does not work for Shadow roots as it is not possible to locate iframe/frame elements within closed shadow roots.The following solutions are possible:
Note that having a dedicated locator or method would allow for a more efficient implementation as generally implementations do not need to look over the entire dom tree to find a frame owner element for a given navigable. In the HTML spec terms this seems to correspond to the concept of a navigable container: https://html.spec.whatwg.org/multipage/document-sequences.html#navigable-container
Related Playwright feedback:
The text was updated successfully, but these errors were encountered: