var contextMenu = Menu.buildFromTemplate([ { label: 'Show App', click: function(){ mainWindow.show(); } }, { label: 'Quit', click: function(){ application.isQuiting = true; application.quit(); } } ]);