-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
docs(dotnet): introduce separate csharp viewport option #6198
docs(dotnet): introduce separate csharp viewport option #6198
Conversation
The other option here, would be to introduce code examples for all of the languages to demonstrate how to disable the viewport, but that feels like a higher overhead than the proposed solution. Now, if only we had language-specific notes >:-] |
I'd either follow js or python, no need for unique approach in c# |
https://playwright.dev/python/docs/api/class-browser/#browsernew_contextkwargs - check out |
Looks abandoned. |
@pfeldman In C#, the approach of using a constant is more familiar than using a separate parameter. We also have a For that reason, I'd like to keep it this way. |
@pavelfeldman @avodovnik can we land this PR? :) |
- `width` <[int]> page width in pixels. | ||
- `height` <[int]> page height in pixels. | ||
|
||
Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use `ViewportSize.NoViewport` to disable the default viewport. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An afterthought: maybe rename it to NoDefaultViewport for clarity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not strong to say no, but I don't know if it will bring more clarity. If you start typing ViewportSize.
as a static call, you kinda know where you are going to... you are going to No(something)
.
Due to our handling of
null
, we want to be explicit in the docs, that the user needs to pass in a special value forundefined
.