#Opening Windows in internet browser
7 messages · Page 1 of 1 (latest)
You can probably use something like shell.OpenExternal().
https://www.electronjs.org/docs/latest/api/shell#shellopenexternalurl-options
Example:
const { shell } = require('electron')
shell.openExternal('https://github.com')
The issue is how would I do that based on when they click an a tag on the page?
Because I can't require electron in js files that are linked to the html file
see this API https://www.electronjs.org/docs/latest/api/web-contents#contentssetwindowopenhandlerhandler
Render and control web pages.
this will allow you to customize behaviour when opening links in a new window🙂