Skip to content

App

zcbenz edited this page · 22 revisions
Clone this wiki locally
Clone in Desktop

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.

Something went wrong with that request. Please try again.