Skip to content

Commit

Permalink
Rename option to viewportSize
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s committed Feb 9, 2021
1 parent 966f335 commit 77cf73d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/src/api/class-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -2051,8 +2051,8 @@ page.set_viewport_size({"width": 640, "height": 480})
page.goto("https://example.com")
```

### param: Page.setViewportSize.viewport
- `viewport` <[Object]>
### param: Page.setViewportSize.viewportSize
- `viewportSize` <[Object]>
- `width` <[int]> page width in pixels.
- `height` <[int]> page height in pixels.

Expand Down
11 changes: 10 additions & 1 deletion docs/src/api/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,21 @@ Whether to ignore HTTPS errors during navigation. Defaults to `false`.
Toggles bypassing page's Content-Security-Policy.

## context-option-viewport
* langs: java, js
* langs: js
- `viewport` <[null]|[Object]>
- `width` <[int]> page width in pixels.
- `height` <[int]> page height in pixels.

Sets a consistent viewport for each page. Defaults to an 1280x720 viewport. `null` disables the default viewport.

## csharp-java-context-option-viewport
* langs: csharp, java
- `viewportSize` <[null]|[Object]>
- `width` <[int]> page width in pixels.
- `height` <[int]> page height in pixels.

Sets a consistent viewport for each page. Defaults to an 1280x720 viewport. `null` disables the default viewport.

## evaluate-expression
- `expression` <[string]>

Expand Down Expand Up @@ -496,6 +504,7 @@ The default value can be changed by using the [`method: BrowserContext.setDefaul
- %%-context-option-bypasscsp-%%
- %%-context-option-viewport-%%
- %%-python-context-option-viewport-%%
- %%-csharp-java-context-option-viewport-%%
- %%-python-context-option-no-viewport-%%
- %%-context-option-useragent-%%
- %%-context-option-devicescalefactor-%%
Expand Down
4 changes: 2 additions & 2 deletions types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2638,9 +2638,9 @@ export interface Page {
* await page.goto('https://example.com');
* ```
*
* @param viewport
* @param viewportSize
*/
setViewportSize(viewport: {
setViewportSize(viewportSize: {
/**
* page width in pixels.
*/
Expand Down

0 comments on commit 77cf73d

Please sign in to comment.