fix: add goto frame navigation

This commit is contained in:
RohitR311
2024-12-07 21:18:37 +05:30
parent d6be2683fd
commit db37c72ce5

View File

@@ -402,11 +402,11 @@ export class RemoteBrowser {
await this.currentPage?.close();
this.currentPage = newPage;
if (this.currentPage) {
// 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());
}
});
this.currentPage.on('load', (page) => {
this.socket.emit('urlChanged', page.url());
})