node-webkit chromium args的正确语法是什么?

时间:2013-04-30 09:21:00

标签: json node-webkit

在我的node-webkit的package.json文件中,我有:"chromium-args" : "--url="http://www.google.com""我尝试使用反斜杠\“www.google.com \”,但是当使用blackslashes时,webkit似乎根本无法打开。如果我将黑色留下,webkit会加载窗口但会产生JSON语法错误。

package.json文件代码:

{
  "main": "index.html",
  "name": "nw-demo",
  "description": "demo app of node-webkit",
  "version": "0.1.0",
  "keywords": [ "demo", "node-webkit" ],
  "window": {
    "icon": "link.png",
    "toolbar": true,
    "width": 800,
    "height": 500,
    "position": "mouse",
    "min_width": 400,
    "min_height": 200,
    "max_width": 800,
    "max_height": 600
  },
  "webkit": {
    "plugin": true
  },
  "chromium-args" : "--url=\"http://www.google.com\""
}

“chromium-args”的正确json语法是什么?

2 个答案:

答案 0 :(得分:0)

对于'url',您可以在'main'字段中写入。

对于引用它可以这样写'--key

答案 1 :(得分:0)

而不是双引号使用单引号

"chromium-args" : "--url='http://www.google.com'"