Skip to content

Commit 1ecb65d

Browse files
0xlakshanOrKoN
authored andcommitted
window state
1 parent c74f72e commit 1ecb65d

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/tools/pages.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,12 @@ export const resizePage = defineTool({
211211
handler: async (request, response, context) => {
212212
const page = context.getSelectedPage();
213213

214+
const client = await page.createCDPSession();
215+
const {windowId} = await client.send('Browser.getWindowForTarget');
216+
const {bounds} = await client.send('Browser.getWindowBounds', {
217+
windowId,
218+
});
219+
214220
await page.resize({
215221
contentWidth: request.params.width,
216222
contentHeight: request.params.height,

0 commit comments

Comments
 (0)