Change Electron's menu item's status dynamically
问题 Like in any standard native application, also my electron's application needs to change the status (enabled/dsabled) of several menu item, based on live usage results. I am setting up my menu in main.js: function createWindow () { ... ... require('./menu/mainmenu'); } The MenuItem I need to change is defined in mainmenu: { label: "Show Colors", accelerator: 'CmdOrCtrl+1', enabled: getStatus(), click() {getWebviewWebContents().send('switchToColors');} }, where getStatus() is function returning