How to open a browser window from a node-webkit app?

Infant Dev picture Infant Dev · Oct 3, 2013 · Viewed 9.8k times · Source

I have a desktop application, packaged using node-webkit. I need to open the default browser of the user on click of a link. I am using

window.open("www.google.com")

but this opens a new node-webkit window rather than opening a browser window. How do I open a browser window instead??

Answer

theabraham picture theabraham · Oct 4, 2013

To open a link in the user's default browser, you could use gui.Shell.openExternal("http://website.com"). Checkout the documentation for gui.Shell.