I am using Electron’s shell.openExternal(url)
to open a new tab in the OS’s default browser from an Electron app. I would like to know if there is a way to detect events on that tab from the Electron app, specifically whenever the tab is closed.
The main reason I would like to detect this change is because I am calling a Node child_process
, that starts a local web server on localhost:5000
, and I would like to open a browser tab automatically to see the web server’s interface, but after the user closes the tab I would like to stop the child_process
.
Is this possible with shell.openExternal
?