In electron 1.8.7 I could just do this:
.on('browser-window-created', (e, window) => {
window.setMenu(null);
})
But in electron 4.0.1 this doesn't seem to work anymore.
In electron 1.8.7 I could just do this:
.on('browser-window-created', (e, window) => {
window.setMenu(null);
})
But in electron 4.0.1 this doesn't seem to work anymore.
It should work the same way, but looks like there's a bug in Electron (https://github.com/electron/electron/issues/15901). A workaround is suggested in the comments: Set autoHideMenuBar-option to true when creating the BrowserWindow-object. Unfortunately that will still show the menu when alt key is pressed.
Edit: There's a better workaround. Use BrowserWindow.setMenuBarVisibility(false).
Alternatively, you can try Electron version 3.