Back to Puppeteer

Page.resize() method

website/versioned_docs/version-24.40.0/api/puppeteer.page.resize.md

19.2.2579 B
Original Source

Page.resize() method

Resizes the browser window of this page so that the content area (excluding browser UI) has the specified width and height.

Signature

typescript
class Page {
  abstract resize(params: {
    contentWidth: number;
    contentHeight: number;
  }): Promise<void>;
}

Parameters

<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

params

</td><td>

{ contentWidth: number; contentHeight: number; }

</td><td> </td></tr> </tbody></table>

Returns:

Promise<void>