Skip to content

Commit

Permalink
Use new Puppeteer headless mode (#117)
Browse files Browse the repository at this point in the history
Co-authored-by: Sindre Sorhus <[email protected]>
  • Loading branch information
cbbfcd and sindresorhus authored Jan 29, 2024
1 parent c32ad08 commit c08c871
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export type Options = {
Note: Some of the launch options are overridden by the `debug` option.
@default {}
@default {headless: 'new'}
*/
readonly launchOptions?: PuppeteerLaunchOptions;

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const parseCookie = (url, cookie) => {

const internalCaptureWebsite = async (input, options) => {
options = {
launchOptions: {},
launchOptions: {headless: 'new'},
...options,
};
const {launchOptions} = options;
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ await captureWebsite.file('index.html', 'screenshot.png', {
##### launchOptions

Type: `object`\
Default: `{}`
Default: `{headless: 'new'}`

Options passed to [`puppeteer.launch()`](https://pptr.dev/api/puppeteer.puppeteernodelaunchoptions).

Expand Down

0 comments on commit c08c871

Please sign in to comment.