Skip to content

Commit

Permalink
Remove example of disabling headless new (#6095)
Browse files Browse the repository at this point in the history
  • Loading branch information
jennifer-shehane authored Jan 31, 2025
1 parent 5b10865 commit 640065e
Showing 1 changed file with 0 additions and 21 deletions.
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

0 comments on commit 640065e

Please sign in to comment.