“噢,啪!” Chrome中的错误

时间:2015-04-20 15:47:21

标签: javascript google-chrome tabs

我需要一些帮助。

我正在尝试创建一个非常简单的Chrome应用程序,单击该应用程序后,会自动将其重定向到新选项卡中的URL。选项卡打开,似乎加载页面,但最后我得到“Aw,Snap!”错误。

这就是我所看到的: http://gyazo.com/ef733df79e6449b22998f1cbb297d770

我的代码是:

的manifest.json:

{
  "name": "Here goes the name",
  "description": "Here goes the description",
  "version": "Here goes the version",
  "manifest_version": 2,
  "default_locale": "en",
  "icons": {
    "128": "images/icon_128.png"
  },
  "permissions": [
    "http://*/*",
    "https://*/*"
  ],
  "app": {
    "background": {
      "scripts": ["background.js"]
    }
  }
}

background.js:

chrome.app.runtime.onLaunched.addListener(function () {
    window.open("Here goes the URL");
});

我的Chrome版本为42.0.2311.90 m。

我卸载了所有Chrome应用程序,没有任何结果。

我删除了所有Cookie,没有结果。

我再次卸载并安装了Chrome,没有结果。

请告诉我,我做错了什么?

0 个答案:

没有答案