-
Notifications
You must be signed in to change notification settings - Fork 3.9k
zcbenz edited this page Nov 1, 2012
·
26 revisions
App API requires node-webkit >= v0.3.1
// Load native UI library
var gui = require('nw.gui');
// Quit current app
gui.App.quit();
Quit current app.
Get or Set the application menu.
Note: Only Mac has the application menu, and node-webkit will automatically merge your menu with the standard original application menu. For example, following code will create a simplest application menu:
var gui = require('nw.gui');
gui.App.menu = new gui.Menu({ type: 'menubar' });
And unlike the original application menu of node-webkit, the newly created one will change all node-webkit
string to your-app-name
.