Skip to content

Instantly share code, notes, and snippets.

@jasonblanchard
Last active August 29, 2015 14:08
Show Gist options
  • Select an option

  • Save jasonblanchard/44c3486dbcf2e474f53a to your computer and use it in GitHub Desktop.

Select an option

Save jasonblanchard/44c3486dbcf2e474f53a to your computer and use it in GitHub Desktop.
var gui = require('nw.gui');
var menu = new gui.Menu({type:"menubar"});
// Only called on OS X
if (menu.createMacBuiltin !== undefined) {
menu.createMacBuiltin("Recorder");
}
menu.append(new gui.MenuItem({
label: 'Item A',
click: function() {
console.log("Item A clicked!");
}
}));
gui.Window.get().menu = menu;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment