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
fix: defaultViewport can be null in BrowserConnectOptions #6992
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
Could you please add more details? Ideally - open an issue justifying the need of the change. |
@sadym-chromium, thank you for the advice. |
@sadym-chromium Another open pull request with linked issues #6942 |
@sadym-chromium thank you for your review and approval. |
Closed in favour of #6942 |
Steps to reproduce
Description:
As per API
defaultViewport
field in launch options (puppeteer.lauch( { defaultViewport: ... } )
link ) can have the three below values:Viewport
object - The specified viewport will be applied.undefined
(i.e.defaultViewport
field is absent) - Default viewport will be applied.null
- No viewport will be applied. Useful in headful mode, because page content will accomodate to browser extent.Tell us about your environment:
puppeteer/src/common/BrowserConnector.ts
Line 40 in 0b5969d
What steps will reproduce the problem?
puppeteer.launch(options)
function.defaultViewport
field asnull
.Please include code that reproduces the issue.
What is the expected result?
Code is accepted as valid, no type error raises.
What happens instead?
Type error raises, which tells that
null
is not valid value fordefaultViewport
.