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 support for "isMobile" argument for "browsingContext.setViewport" command #772

Open
whimboo opened this issue Sep 13, 2024 · 1 comment
Labels
enhancement New feature or request module-browsingContext Browsing Context module needs-discussion Issues to be discussed by the working group

Comments

@whimboo
Copy link
Contributor

whimboo commented Sep 13, 2024

Both Puppeteer and Playwright support an isMobile boolean argument for the setViewport command, which is currently missing in WebDriver BiDi. We should add support for this parameter with the following behavior:

  • Default Behavior: By default isMobile is set to false, meaning the device is not treated as a mobile device and touch events are not enabled.

  • Mobile Mode: When isMobile is set to true, the browser will behave as if it's running on a mobile device. This includes rendering the website in mobile mode by taking the meta viewport tag and CSS media queries into account. Additionally, touch events are enabled, allowing mobile interactions like swiping and tapping.

Question: We currently support touch events in input.performActions by default. How should these behave when mobile mode is disabled? Should we consider disallowing their use in this case?

@whimboo whimboo added enhancement New feature or request module-browsingContext Browsing Context module needs-discussion Issues to be discussed by the working group labels Sep 13, 2024
@whimboo whimboo changed the title Add support for "isLandscape" argument for "browsingContext.setViewport" command Add support for "isMobile" argument for "browsingContext.setViewport" command Sep 13, 2024
@whimboo
Copy link
Contributor Author

whimboo commented Sep 13, 2024

Question: We currently support touch events in input.performActions by default. How should these behave when mobile mode is disabled? Should we consider disallowing their use in this case?

There is actually a hasTouch argument as well that we do not cover yet and I filed #773 for.

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 needs-discussion Issues to be discussed by the working group
Projects
None yet
Development

No branches or pull requests

1 participant