File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 * SPDX-License-Identifier: Apache-2.0
55 */
66
7+ // import fs from 'node:fs';
8+ // import path from 'node:path';
9+
710import { logger } from '../logger.js' ;
811import { zod } from '../third_party/index.js' ;
912
@@ -217,6 +220,22 @@ export const resizePage = defineTool({
217220 windowId,
218221 } ) ;
219222
223+ if ( bounds . windowState === 'fullscreen' ) {
224+ // have to call this twice when window is in fullscreen mode
225+ await client . send ( 'Browser.setWindowBounds' , {
226+ windowId,
227+ bounds : { windowState : 'normal' } ,
228+ } ) ;
229+ await client . send ( 'Browser.setWindowBounds' , {
230+ windowId,
231+ bounds : { windowState : 'normal' } ,
232+ } ) ;
233+ } else if ( bounds . windowState !== 'normal' ) {
234+ await client . send ( 'Browser.setWindowBounds' , {
235+ windowId,
236+ bounds : { windowState : 'normal' } ,
237+ } ) ;
238+ }
220239 await page . resize ( {
221240 contentWidth : request . params . width ,
222241 contentHeight : request . params . height ,
You can’t perform that action at this time.
0 commit comments