feat: update viewport property
This commit is contained in:
@@ -153,6 +153,8 @@ export class RemoteBrowser {
|
|||||||
this.socket.on('setViewportSize', async (data: { width: number, height: number }) => {
|
this.socket.on('setViewportSize', async (data: { width: number, height: number }) => {
|
||||||
const { width, height } = data;
|
const { width, height } = data;
|
||||||
logger.log('debug', `Received viewport size: width=${width}, height=${height}`);
|
logger.log('debug', `Received viewport size: width=${width}, height=${height}`);
|
||||||
|
|
||||||
|
this.viewportSize = { width, height };
|
||||||
|
|
||||||
// Update the browser context's viewport dynamically
|
// Update the browser context's viewport dynamically
|
||||||
if (this.context && this.browser) {
|
if (this.context && this.browser) {
|
||||||
|
|||||||
Reference in New Issue
Block a user