0

Is there a way to open URL in default OS browser?

I have MenuItem and want to open certain URL whenever user clicks this item:

var item = new gui.MenuItem({
  label: 'Shortcut',
  click: function(){
    //here i want OS to open some URL 
  } 
});
H1D
  • 748
  • 1
  • 6
  • 18

1 Answers1

2

You can proceed like that:

gui.Shell.openExternal("http://website.com")

See the documentation here: https://github.com/rogerwang/node-webkit/wiki/Shell

See also How to open a browser window from a node-webkit app? for more informations.

Community
  • 1
  • 1
Nicolas Henrard
  • 843
  • 8
  • 19