I'm using electron for the first time at the same time as js and node, I'm trying to make an application for hobby and knowledge. I'm facing a problem when implementing my script to open external links.
I've been using the doc to fix the problem, but I haven't seen anything to help me with that problem.
My ex-links.js
const electron = require("electron");
const { shell } = electron;
const exLinkBtn = document.getElementById("open-ex-link");
exLinkBtn.addEventListener("click", function() {
shell.openExternal("https://www.youtube.com/watch?v=ifXalt3MJtM");
});
I've already tried to place the slider.html inside index.html and yet I still get that error, so I left it as I currently have it inside an iframe.
<iframe src="slider.html" frameborder=0 width="1180" height="728" style="padding-left:198.5px;"></iframe>
I expect that by clicking the open-ex-link button it will open the link in the default browser.