-
Notifications
You must be signed in to change notification settings - Fork 575
Auto viewport resize in headless mode #49
Comments
The default in this case is |
@schickling can auto sizing be done using |
You setting this inside of a |
@schickling I'm wondering if it possible to do full height, when it's an unknown. |
You probably first need to find out the height using an |
@schickling That's what I saw was being done here but not when const screenshot = await chromeless
.goto('https://www.graph.cool')
.evaluate(async () => {
const height = window.innerHeight;
const width = window.innerWidth;
await chromeless.viewport(width, height);
})
.screenshot() |
What you want here (at least for the mean time) is to: I think evaluate doesn't pass anything but what is returned to it, so screenshot would get a blank image.
then you call:
This worked for me, at least, putting here for others in the same boat. |
I'm wondering why viewport size is set to 1440x900 by default when in headless mode. Is it not possible to do this in headless mode too?
The text was updated successfully, but these errors were encountered: