提醒/确认在Chrome应用中无效 - 缺少配置?

时间:2016-10-13 01:56:43

标签: json google-chrome-app

我制作了一个Chrome应用,以webview标记显示我的网页,但js API alert()/confirm()不起作用。这让我很疑惑。 Chrome应用需要配置支持确认的内容吗?

这是我的manifest.json:

{
"app": {
    "background": {
        "scripts": ["background.js"]
    }
},
"manifest_version": 2,
"name": "Performance Monitor",
"version": "1.0",
"description": "A performance monitor to show cpu and memory status.",
"icons": {
    "16": "img/ccloud.png",
    "48": "img/ccloud.png",
    "128": "img/ccloud.png"
},
"permissions": [
    "webview"
],
"webview": {
    "partitions": [
        {
            "name": "static",
            "accessible_resources": ["header.html", "footer.html", "static.png"]
        },
        {
            "name": "trusted*",
            "accessible_resources": ["local_*.html", "*.png", "*.js"]
        },
        {
            "name": "trusted-audio",
            "accessible_resources": ["*.mp3"]
        }
    ]
    }
}

0 个答案:

没有答案