Skip to content

Commit aa9997d

Browse files
committed
fix: use page.setViewport instead of page.resize
1 parent 90ed192 commit aa9997d

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/tools/pages.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,9 @@ export const resizePage = defineTool({
207207
handler: async (request, response, context) => {
208208
const page = context.getSelectedPage();
209209

210-
// @ts-expect-error internal API for now.
211-
await page.resize({
212-
contentWidth: request.params.width,
213-
contentHeight: request.params.height,
210+
await page.setViewport({
211+
width: request.params.width,
212+
height: request.params.height,
214213
});
215214

216215
response.setIncludePages(true);

0 commit comments

Comments
 (0)