fix: add on load socket emit

This commit is contained in:
RohitR311
2024-12-06 16:57:55 +05:30
parent 964913775e
commit 0d66331305

View File

@@ -370,11 +370,11 @@ export class RemoteBrowser {
await this.stopScreencast();
this.currentPage = page;
this.currentPage.on('framenavigated', (frame) => {
if (frame === this.currentPage?.mainFrame()) {
this.socket.emit('urlChanged', this.currentPage.url());
}
});
// this.currentPage.on('framenavigated', (frame) => {
// if (frame === this.currentPage?.mainFrame()) {
// this.socket.emit('urlChanged', this.currentPage.url());
// }
// });
//await this.currentPage.setViewportSize({ height: 400, width: 900 })
this.client = await this.currentPage.context().newCDPSession(this.currentPage);