Skip to main content
Version: 24.34.0

Page.resize() 方法

¥Page.resize() method

调整此页面的浏览器窗口大小,使内容区域(不包括浏览器 UI)具有指定的宽度和高度。

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

签名

¥Signature

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

参数

¥Parameters

范围

类型

描述

params

{ contentWidth: number; contentHeight: number; }

Returns:

Promise<void>