docs: typos and minor documentation issues (#8211)

This commit is contained in:
Alex Rudenko 2022-04-08 11:58:55 +02:00 committed by GitHub
parent 04e5c88997
commit ed4afe81a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 27 deletions

View File

@ -51,8 +51,7 @@ npm i puppeteer-core
# or "yarn add puppeteer-core"
```
`puppeteer-core` is intended to be a lightweight version of Puppeteer for launching an existing browser installation or for connecting to a remote one. Be sure that the version of puppeteer-core you install is compatible with the
browser you intend to connect to.
`puppeteer-core` is intended to be a lightweight version of Puppeteer for launching an existing browser installation or for connecting to a remote one. Be sure that the version of puppeteer-core you install is compatible with the browser you intend to connect to.
See [puppeteer vs puppeteer-core](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#puppeteer-vs-puppeteer-core).

View File

@ -2316,7 +2316,7 @@ This setting will change the default maximum time for the following methods and
- `enabled` <[boolean]>
- returns: <[Promise]>
Enables the Input.drag methods. This provides the capability to cpature drag events emitted on the page, which can then be used to simulate drag-and-drop.
Enables the Input.drag methods. This provides the capability to capture drag events emitted on the page, which can then be used to simulate drag-and-drop.
#### page.setExtraHTTPHeaders(headers)

View File

@ -24,6 +24,19 @@ export interface PDFMargin {
right?: string | number;
}
type LowerCasePaperFormat =
| 'letter'
| 'legal'
| 'tabloid'
| 'ledger'
| 'a0'
| 'a1'
| 'a2'
| 'a3'
| 'a4'
| 'a5'
| 'a6';
/**
* All the valid paper format types when printing a PDF.
*
@ -55,17 +68,9 @@ export interface PDFMargin {
* @public
*/
export type PaperFormat =
| 'letter'
| 'legal'
| 'tabloid'
| 'ledger'
| 'a0'
| 'a1'
| 'a2'
| 'a3'
| 'a4'
| 'a5'
| 'a6';
| Uppercase<LowerCasePaperFormat>
| Capitalize<LowerCasePaperFormat>
| LowerCasePaperFormat;
/**
* Valid options to configure PDF generation via {@link Page.pdf}.
@ -174,16 +179,17 @@ export interface PaperFormatDimensions {
/**
* @internal
*/
export const paperFormats: Record<PaperFormat, PaperFormatDimensions> = {
letter: { width: 8.5, height: 11 },
legal: { width: 8.5, height: 14 },
tabloid: { width: 11, height: 17 },
ledger: { width: 17, height: 11 },
a0: { width: 33.1, height: 46.8 },
a1: { width: 23.4, height: 33.1 },
a2: { width: 16.54, height: 23.4 },
a3: { width: 11.7, height: 16.54 },
a4: { width: 8.27, height: 11.7 },
a5: { width: 5.83, height: 8.27 },
a6: { width: 4.13, height: 5.83 },
} as const;
export const paperFormats: Record<LowerCasePaperFormat, PaperFormatDimensions> =
{
letter: { width: 8.5, height: 11 },
legal: { width: 8.5, height: 14 },
tabloid: { width: 11, height: 17 },
ledger: { width: 17, height: 11 },
a0: { width: 33.1, height: 46.8 },
a1: { width: 23.4, height: 33.1 },
a2: { width: 16.54, height: 23.4 },
a3: { width: 11.7, height: 16.54 },
a4: { width: 8.27, height: 11.7 },
a5: { width: 5.83, height: 8.27 },
a6: { width: 4.13, height: 5.83 },
} as const;