feat: notify client of url change

This commit is contained in:
karishmas6
2024-06-08 00:32:49 +05:30
parent 4886bbb08b
commit 8e977900ab

View File

@@ -488,5 +488,17 @@ export class WorkflowGenerator {
}
}
}
/**
* Notifies the client about the change of the url if navigation
* happens after some performed action.
* @param url The new url.
* @param fromNavBar Whether the navigation is from the simulated browser's navbar or not.
* @returns void
*/
public notifyUrlChange = (url:string) => {
if (this.socket) {
this.socket.emit('urlChanged', url);
}
}
}