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 viewport option #784

Merged
merged 6 commits into from Oct 5, 2020
Merged

Add support for viewport option #784

merged 6 commits into from Oct 5, 2020

Conversation

gmetais
Copy link
Contributor

@gmetais gmetais commented Oct 3, 2020

Hi @macbre,

I'm adding in this pull request a viewport extension, that allows one to specify any window dimension:
Example: 1100x700

It also supports setting pixel density ratio, using the following syntax:
1100x700x2

I hope this code is conform to how you were seeing things.

Just a note on integration tests. Tests were failing when using window.outerWidth and window.outerHeight as in devices.html. I had to use inner dimensions for the tests to pass (window.innerWidth and window.innerHeight) in a new viewport.html file.

@macbre macbre added Chrome-headless Tasks related with migration from PhantomJS to Puppeteer's headless Chrome enhancement labels Oct 5, 2020
@macbre macbre added this to the v2.0 - headless Chromium milestone Oct 5, 2020
Copy link
Owner

@macbre macbre left a comment

Choose a reason for hiding this comment

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

Thanks, @gmetais !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chrome-headless Tasks related with migration from PhantomJS to Puppeteer's headless Chrome enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants