From 27db1eb4f45be23fe59c6609d6a45442c31148dc Mon Sep 17 00:00:00 2001 From: Thiago Perrotta Date: Thu, 1 Jun 2023 11:49:27 -0400 Subject: [PATCH] docs: add webp to captureScreenshot.format (#10295) --- docs/api/puppeteer.page.screenshot.md | 2 +- packages/puppeteer-core/src/api/Page.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api/puppeteer.page.screenshot.md b/docs/api/puppeteer.page.screenshot.md index 06a4df73..3ccd2d5c 100644 --- a/docs/api/puppeteer.page.screenshot.md +++ b/docs/api/puppeteer.page.screenshot.md @@ -36,7 +36,7 @@ Options object which might have the following properties: - `path` : The file path to save the image to. The screenshot type will be inferred from file extension. If `path` is a relative path, then it is resolved relative to [current working directory](https://nodejs.org/api/process.html#process_process_cwd). If no path is provided, the image won't be saved to the disk. -- `type` : Specify screenshot type, can be either `jpeg` or `png`. Defaults to 'png'. +- `type` : Specify screenshot type, can be `jpeg`, `png` or `webp`. Defaults to 'png'. - `quality` : The quality of the image, between 0-100. Not applicable to `png` images. diff --git a/packages/puppeteer-core/src/api/Page.ts b/packages/puppeteer-core/src/api/Page.ts index a48f574c..2d4e9435 100644 --- a/packages/puppeteer-core/src/api/Page.ts +++ b/packages/puppeteer-core/src/api/Page.ts @@ -2248,7 +2248,7 @@ export class Page extends EventEmitter { * | current working directory}. * If no path is provided, the image won't be saved to the disk. * - * - `type` : Specify screenshot type, can be either `jpeg` or `png`. + * - `type` : Specify screenshot type, can be `jpeg`, `png` or `webp`. * Defaults to 'png'. * * - `quality` : The quality of the image, between 0-100. Not