Skip to content

Commit 640065e

Browse files
Remove example of disabling headless new (#6095)
1 parent 5b10865 commit 640065e

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

docs/api/node-events/browser-launch-api.mdx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -394,27 +394,6 @@ on('before:browser:launch', (browser, options) => {
394394

395395
:::
396396

397-
### Disable `--headless=new` for Chrome
398-
399-
Starting in Chrome 112, you can change the value of the `--headless` flag to the
400-
old value before the `--headless=new` flag was introduced.
401-
402-
```ts
403-
on('before:browser:launch', (browser = {}, launchOptions) => {
404-
if (browser.name === 'chrome' && browser.isHeadless) {
405-
launchOptions.args = launchOptions.args.map((arg) => {
406-
if (arg === '--headless=new') {
407-
return '--headless'
408-
}
409-
410-
return arg
411-
})
412-
}
413-
414-
return launchOptions
415-
})
416-
```
417-
418397
### Set a Firefox flag
419398

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

0 commit comments

Comments
 (0)