mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: fix typo in setViewport docs (#11382)
This commit is contained in:
parent
2bf28ea1e5
commit
c7921ae42c
@ -28,20 +28,6 @@ Promise<void>
|
|||||||
|
|
||||||
## Remarks
|
## 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.
|
NOTE: in certain cases, setting viewport will reload the page in order to set the isMobile or hasTouch properties.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
@ -17,15 +17,3 @@ class Page {
|
|||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
[Viewport](./puppeteer.viewport.md) \| null
|
[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`.
|
|
||||||
|
@ -2058,22 +2058,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|||||||
*
|
*
|
||||||
* @param viewport -
|
* @param viewport -
|
||||||
* @remarks
|
* @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
|
* NOTE: in certain cases, setting viewport will reload the page in order to
|
||||||
* set the isMobile or hasTouch properties.
|
* set the isMobile or hasTouch properties.
|
||||||
*/
|
*/
|
||||||
@ -2081,24 +2065,6 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Current page viewport settings.
|
* 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;
|
abstract viewport(): Viewport | null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user