feat: update viewport property

This commit is contained in:
karishmas6
2024-10-22 02:46:35 +05:30
parent 39501bb8aa
commit b8946e2913

View File

@@ -153,6 +153,8 @@ export class RemoteBrowser {
this.socket.on('setViewportSize', async (data: { width: number, height: number }) => {
const { width, height } = data;
logger.log('debug', `Received viewport size: width=${width}, height=${height}`);
this.viewportSize = { width, height };
// Update the browser context's viewport dynamically
if (this.context && this.browser) {