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

browsingContext.create should be able to support WebDriver classic New Window command #151

Open
bwalderman opened this issue Nov 29, 2021 · 0 comments
Labels
enhancement New feature or request module-browsingContext Browsing Context module

Comments

@bwalderman
Copy link
Contributor

To support future efforts to reformulate WebDriver Classic on top of WebDriver BiDi, it should be possible implement New Window in terms of browsingContext.create.

There are a couple small gaps in the current spec PR #133

  • The classic command uses the implicit current browsing context to determine which OS window the implementation should try to create the new browsing context in. However, BiDi doesn't have a concept of a "current" or "default" browsing context (by design).
  • The classic command result value has a type that indicates whether the new browsing context was created as a "tab" or a "window". This depends on whether the new context is created in the same OS window as the current browsing context or a different OS window.

We'll likely need to add a parameter to the browsingContext.create command that the WebDriver classic spec can use to explicitly set the desired target window. Exactly how this looks will depend on whether we decide to introduce OS-level windows as a concept in WebDriver BiDi.

If we do add a "Window" concept like this, the browsingContext.create command could accept an optional "window" parameter and use that as a hint of where to create the new browsing context. The reformulated WebDriver classic spec could maintain a handle to the current browsing context's parent "Window" to use for this purpose. Otherwise, if we don't add a "Window" concept, we can still support the needs of WebDriver classic by adding a "context" parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module-browsingContext Browsing Context module
Projects
None yet
Development

No branches or pull requests

2 participants