Skip to content

Commit

Permalink
Merge pull request #125 from beeh5/fix-viewport-resize
Browse files Browse the repository at this point in the history
Fix Viewport resizing upon page.screenshot
  • Loading branch information
sibbl authored May 22, 2024
2 parents 5112964 + 31487f7 commit 49b1acd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const batteryStore = {};
`--lang=${config.language}`,
config.ignoreCertificateErrors && "--ignore-certificate-errors"
].filter((x) => x),
defaultViewport: null,
timeout: config.browserLaunchTimeout,
headless: config.debug !== true
});
Expand Down Expand Up @@ -280,6 +281,7 @@ async function renderUrlToImageAsync(browser, pageConfig, url, path) {
await page.screenshot({
path,
type: pageConfig.imageFormat,
captureBeyondViewport: false,
clip: {
x: 0,
y: 0,
Expand Down

0 comments on commit 49b1acd

Please sign in to comment.