The Shell API is made of a set of methods that allow you to leverage platform-related tasks:
Shell.openExternal(String URI)
: This will open any given URI (http://
,mailto:
, and so on) with the default system application if one has been associated; otherwise, nothing will happen.Shell.openItem(String file_path)
: This will open any given file with the default system application if one has been associated; otherwise, the Open with dialog will be shown.Shell.showItemInFolder(String path)
: This will open the given path inside the system file explorer/finder.
Here's a simple example to open Google.com on your default browser:
var gui = require('nw.gui'); gui.Shell.openExternal('http://www.google.com');