-
-
Notifications
You must be signed in to change notification settings - Fork 203
IBrowserPageViewport
David Ortner edited this page Apr 6, 2024
·
2 revisions
IBrowserPageViewport represents the page viewport.
interface IBrowserPageViewport
import { Browser } from "happy-dom";
const browser = new Browser();
const page = browser.newPage();
page.setViewport({
width: 800,
height: 600,
devicePixelRatio: 2,
});
Property | Type | Description |
---|---|---|
width | number | Page width. |
height | number | Page height. |
devicePixelRatio | number | Device pixel ratio. |