setViewportSize
Sets the HTML pixel dimensions of the webview viewport.
async setViewportSize(size: Vec2): Promise<void>
Parameters
| Parameter | Type | Description |
|---|---|---|
size | Vec2 | The new viewport size as [width, height] in pixels |
Example
await webview.setViewportSize([600, 400]);
To update multiple properties at once, use patch().