Skip to content

Commit

Permalink
more info on closing chromium
Browse files Browse the repository at this point in the history
  • Loading branch information
Sparticuz committed Apr 3, 2024
1 parent 0f12e5f commit 4ce60bd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,14 @@ for (const page of await browser.pages()) {
await browser.close();
```

You can also try the following if one of the calls is hanging for some reason.

```typescript
await Promise.race([browser.close(), browser.close(), browser.close()]);
```

Always `await browser.close()`, even if your script is returning an error.

### I need Accessible pdf files

This is due to the way @sparticuz/chromium is built. If you require accessible pdf's, you'll need to
Expand Down

0 comments on commit 4ce60bd

Please sign in to comment.