feat: use private viewportSize property

This commit is contained in:
karishmas6
2024-10-22 02:47:30 +05:30
parent b8946e2913
commit 2e3da36f51

View File

@@ -304,7 +304,7 @@ export class RemoteBrowser {
if (page) {
await this.stopScreencast();
this.currentPage = page;
await this.currentPage.setViewportSize({ height: 400, width: 900 })
await this.currentPage.setViewportSize(this.viewportSize);
this.client = await this.currentPage.context().newCDPSession(this.currentPage);
this.socket.emit('urlChanged', this.currentPage.url());
await this.makeAndEmitScreenshot();