Skip to content

Commit

Permalink
chore: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightning00Blade committed Apr 20, 2023
1 parent 7624c3c commit 8643fc6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
> Chrome/Chromium over the
> [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/).
> Puppeteer runs in
> [headless](https://developers.google.com/web/updates/2017/04/headless-chrome)
> [headless](https://developer.chrome.com/articles/new-headless/)
> mode by default, but can be configured to run in full (non-headless)
> Chrome/Chromium.
Expand Down Expand Up @@ -177,20 +177,24 @@ import puppeteer from 'puppeteer';
**1. Uses Headless mode**

By default Puppeteer launches Chromium in
[headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome).
[old headless mode](https://developer.chrome.com/articles/new-headless/).

> Note: Deprecated please consider using `headless: 'new'`
> See example bellow.
```ts
const browser = await puppeteer.launch();
// Equivalent to
const browser = await puppeteer.launch({headless: true});
```

This behavior will change in the feature with the introduction of [--headless=new](https://developer.chrome.com/articles/new-headless/).
You can already try it out:
[Chrome 112 launched a new Headless mode](https://developer.chrome.com/articles/new-headless/) that might cause some differences in behavior compared to the old Headless implementation.
In the future Puppeteer will start defaulting to new implementation.
We recommend you try it out before the switch:

```ts
const browser = await puppeteer.launch({headless: 'new'});
```

To launch a full version of Chromium, set the
[`headless`](https://pptr.dev/api/puppeteer.browserlaunchargumentoptions)
[`headless`](https://pptr.dev/api/puppeteer.browserlaunchargumentoptions) to `"true"`
option when launching a browser:

```ts
Expand Down
18 changes: 11 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
> Chrome/Chromium over the
> [DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/).
> Puppeteer runs in
> [headless](https://developers.google.com/web/updates/2017/04/headless-chrome)
> [headless](https://developer.chrome.com/articles/new-headless/)
> mode by default, but can be configured to run in full (non-headless)
> Chrome/Chromium.
Expand Down Expand Up @@ -177,20 +177,24 @@ import puppeteer from 'puppeteer';
**1. Uses Headless mode**

By default Puppeteer launches Chromium in
[headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome).
[old headless mode](https://developer.chrome.com/articles/new-headless/).

> Note: Deprecated please consider using `headless: 'new'`
> See example bellow.
```ts
const browser = await puppeteer.launch();
// Equivalent to
const browser = await puppeteer.launch({headless: true});
```

This behavior will change in the feature with the introduction of [--headless=new](https://developer.chrome.com/articles/new-headless/).
You can already try it out:
[Chrome 112 launched a new Headless mode](https://developer.chrome.com/articles/new-headless/) that might cause some differences in behavior compared to the old Headless implementation.
In the future Puppeteer will start defaulting to new implementation.
We recommend you try it out before the switch:

```ts
const browser = await puppeteer.launch({headless: 'new'});
```

To launch a full version of Chromium, set the
[`headless`](https://pptr.dev/api/puppeteer.browserlaunchargumentoptions)
[`headless`](https://pptr.dev/api/puppeteer.browserlaunchargumentoptions) to `"true"`
option when launching a browser:

```ts
Expand Down

0 comments on commit 8643fc6

Please sign in to comment.