Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to find navigable's container #811

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

OrKoN
Copy link
Contributor

@OrKoN OrKoN commented Nov 11, 2024

Specifies one of the possible ways to implement this: using a locator.

Closes #794


Preview | Diff

@OrKoN OrKoN force-pushed the orkon/container-locator branch 2 times, most recently from 217da7c to b6e0478 Compare November 11, 2024 19:31
@OrKoN OrKoN marked this pull request as ready for review November 11, 2024 19:37
@OrKoN OrKoN added needs-discussion Issues to be discussed by the working group needs-tests labels Nov 11, 2024
@@ -2960,6 +2960,7 @@ To <dfn>await a navigation</dfn> given |navigable|, |request|, |wait condition|,
browsingContext.Locator = (
browsingContext.AccessibilityLocator /
browsingContext.CssLocator /
browsingContext.ContainerLocator /
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we cannot have the container as part of the return value of the browsingContext.getTree command? It would be somewhat similar to the clientWindow field.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that API currently does not include any shared references from script and would not allow expressing the ownership of the returned DOM element.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify: we could probably plumb it via the getTree along with the other options we might need to define how to return the element but to me it looks like locateNodes is a better place compared to the getTree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-discussion Issues to be discussed by the working group needs-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support finding iframe elements by browsing context id
2 participants