javascript - 无法让工具栏显示在 Node Webkit 中

标签 javascript node-webkit

我的问题应该是一个简单的问题。根据我查看的文档和教程,一个基本的 nw.js 应用程序应该在顶部有一个工具栏 as such .然而,当我运行我的“Hello World”程序时,我没有这样的工具栏,它看起来像这样:

enter image description here

我还尝试在 package.json 中显式打开工具栏(尽管听起来应该默认启用),如下所示:

{
  "main": "index.html",
  "name": "example",
  "window": {
    "toolbar": true,
    "width": 800
  }
}

但我仍然没有工具栏。我错过了什么?

我的 nw.js 版本是 0.13.0 (windows 64bit)

最佳答案

此选项在 0.13 中已“弃用”:

toolbar is deprecated and it’s always false. The traditional toolbar will NOT be supported including the reload buttons, location bar and DevTools buttons. As a workaround, you can open / close DevTools with F12 (Windows & Linux) or ⌘+⌥+i (Mac). And use win.reload() and win.reloadDev() to simulate the reload buttons.

参见:http://docs.nwjs.io/en/v0.13.0-rc2/For%20Users/Migration/From%200.12%20to%200.13/

虽然使用的语言是“弃用”的选项显然是完全不受支持的。请参阅:https://github.com/nwjs/nw.js/issues/4274

关于javascript - 无法让工具栏显示在 Node Webkit 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36095560/

相关文章:

javascript - document.getElementByID 不是函数

javascript - 如何在选项卡单击时隐藏和显示文本

javascript - 制作自适应 iframe,然后在单击按钮时允许全屏显示

javascript - nwjs (node-webkit) 修改网站 javascript 和 css

javascript - 未捕获的断言错误 : path must be a string error in Require. js

javascript - 映射数组并比较至少一个巧合

javascript - CouchDB 自动归档

javascript - Facebook 桌面应用程序的重定向 url

html - 从 node-webkit 访问 USB 设备?

javascript - 启动后我如何在 Node webkit中获取窗口对象