Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove example of disabling headless new #6095

Merged
merged 1 commit into from
Jan 31, 2025
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
@@ -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