Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions docs/api/node-events/browser-launch-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -394,27 +394,6 @@ on('before:browser:launch', (browser, options) => {

:::

### Disable `--headless=new` for Chrome

Starting in Chrome 112, you can change the value of the `--headless` flag to the
old value before the `--headless=new` flag was introduced.

```ts
on('before:browser:launch', (browser = {}, launchOptions) => {
if (browser.name === 'chrome' && browser.isHeadless) {
launchOptions.args = launchOptions.args.map((arg) => {
if (arg === '--headless=new') {
return '--headless'
}

return arg
})
}

return launchOptions
})
```

### Set a Firefox flag

If we need to set a particular Firefox flag, like `browser.send_pings` we can do
Expand Down