如何从<a> on default OS browser in Electron app?

时间:2016-12-02 17:17:13

标签: javascript electron

I want to take an to an external website, but I do not want it to happen inside electron, I want it to be in the default browser.

I've tried this code:

const {shell} = require('electron')
shell.openExternal('https://github.com')

Docs from here : electron docs

打开网址

但它在Mac OS上不起作用(当id点击它时,它什么也没发生......)。

那么......我怎么能这样做?

谢谢!

0 个答案:

没有答案