NW.js crashes when using Menubar in 0.63.0+
See original GitHub issuesi utilise le menubar, node webkit ouvre et ce ferme tout de suite
var nw = require(‘nw.gui’); var win = nw.Window.get(); var fs = require(‘fs’); var php = require(‘phpjs’); var path = require(‘path’); var chemin = path.resolve();
$(function() { $(“#version p:nth-child(1)”).append(process.versions[‘node-webkit’]); $(“#version p:nth-child(2)”).append(process.versions[‘node’]); $(“#version p:nth-child(3)”).append(process.versions[‘chromium’]);
// Create an empty menubar var menu = new nw.Menu({type: ‘menubar’});
// Create a submenu as the 2nd level menu var submenu = new nw.Menu(); submenu.append(new nw.MenuItem({ label: ‘Item A’ })); submenu.append(new nw.MenuItem({ label: ‘Item B’ }));
// Create and append the 1st level menu to the menubar menu.append(new nw.MenuItem({ label: ‘First Menu’, submenu: submenu }));
// Assign it to window.menu
to get the menu displayed
nw.Window.get().menu = menu;
});
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
I am also seeing this crash (0.64.1). The minimal repro is simply opening
nw.exe
by itself and entering the following into the console:@rogerwang can you please take a look?
This is fixed in git and will be available in the next nightly build.