docs: fix typo in setViewport docs (#11382)

This commit is contained in:
Nathan 2023-11-17 01:48:02 +13:00 committed by GitHub
parent 2bf28ea1e5
commit c7921ae42c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 60 deletions

View File

@ -28,20 +28,6 @@ Promise<void>
## Remarks
Argument viewport have following properties:
- `width`: page width in pixels. required
- `height`: page height in pixels. required
- `deviceScaleFactor`: Specify device scale factor (can be thought of as DPR). Defaults to `1`.
- `isMobile`: Whether the meta viewport tag is taken into account. Defaults to `false`.
- `hasTouch`: Specifies if viewport supports touch events. Defaults to `false`
- `isLandScape`: Specifies if viewport is in landscape mode. Defaults to false.
NOTE: in certain cases, setting viewport will reload the page in order to set the isMobile or hasTouch properties.
## Example

View File

@ -17,15 +17,3 @@ class Page {
**Returns:**
[Viewport](./puppeteer.viewport.md) \| null
- `width`: page's width in pixels
- `height`: page's height in pixels
- `deviceScaleFactor`: Specify device scale factor (can be though of as dpr). Defaults to `1`.
- `isMobile`: Whether the meta viewport tag is taken into account. Defaults to `false`.
- `hasTouch`: Specifies if viewport supports touch events. Defaults to `false`.
- `isLandScape`: Specifies if viewport is in landscape mode. Defaults to `false`.

View File

@ -2058,22 +2058,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
*
* @param viewport -
* @remarks
* Argument viewport have following properties:
*
* - `width`: page width in pixels. required
*
* - `height`: page height in pixels. required
*
* - `deviceScaleFactor`: Specify device scale factor (can be thought of as
* DPR). Defaults to `1`.
*
* - `isMobile`: Whether the meta viewport tag is taken into account. Defaults
* to `false`.
*
* - `hasTouch`: Specifies if viewport supports touch events. Defaults to `false`
*
* - `isLandScape`: Specifies if viewport is in landscape mode. Defaults to false.
*
* NOTE: in certain cases, setting viewport will reload the page in order to
* set the isMobile or hasTouch properties.
*/
@ -2081,24 +2065,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
/**
* Current page viewport settings.
*
* @returns
*
* - `width`: page's width in pixels
*
* - `height`: page's height in pixels
*
* - `deviceScaleFactor`: Specify device scale factor (can be though of as
* dpr). Defaults to `1`.
*
* - `isMobile`: Whether the meta viewport tag is taken into account. Defaults
* to `false`.
*
* - `hasTouch`: Specifies if viewport supports touch events. Defaults to
* `false`.
*
* - `isLandScape`: Specifies if viewport is in landscape mode. Defaults to
* `false`.
*/
abstract viewport(): Viewport | null;