Add "event" parameter for "click" handler of MenuItem

This commit is contained in:
Cheng Zhao 2016-06-22 11:22:14 +09:00
parent e6327fb015
commit 8d08e215b2
5 changed files with 11 additions and 9 deletions

View file

@ -114,9 +114,9 @@ Menu.prototype._init = function () {
var command = this.commandsMap[commandId]
return command != null ? command.icon : undefined
},
executeCommand: (commandId) => {
executeCommand: (event, commandId) => {
var command = this.commandsMap[commandId]
return command != null ? command.click(BrowserWindow.getFocusedWindow()) : undefined
return command != null ? command.click(event, BrowserWindow.getFocusedWindow()) : undefined
},
menuWillShow: () => {
// Make sure radio groups have at least one menu item seleted.