我正在使用node webkit构建应用程序。在index.html文件中,我添加了以下代码,以确保在节点应用程序工具栏中获取devtool / setting图标:
var gui = require('nw.gui');
var win = gui.Window.get(),
nativeMenuBar = new gui.Menu({
type: "menubar"
});
// check operating system for the menu
if (process.platform === "darwin") {
nativeMenuBar.createMacBuiltin("Your App Name");
}
// actually assign menu to window
win.menu = nativeMenuBar;
..虽然使用上面的代码我能够在mac和linux-ubuntu中调出devtools / setting图标,同样不适用于win 7并且当相同时没有设置/ devtools图标出现应用程序在win 7中打开。
任何修复程序都会确保devtool图标出现在我的节点应用程序的工具栏中,而不管操作系统(mac,win或linux)是什么?