Skip to content
zcbenz edited this page Nov 1, 2012 · 26 revisions

App API requires node-webkit >= v0.3.1

Synopsis

// Load native UI library
var gui = require('nw.gui');

// Quit current app
gui.App.quit();

Reference

quit()

Quit current app.

menu

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.

Clone this wiki locally