【发布时间】:2014-02-03 12:10:48
【问题描述】:
我的 Chrome 应用具有以下清单:
{
"name": ",
"version": "1.0.3",
"manifest_version": 2,
"description": "Chrome Extension for.",
"icons": {
"16": "images/test.png",
"19": "images/test.png",
"256": "images/test.png"
},
"app": {
"background": {
"scripts": [
"background.js"
]
}
},
"sandbox": {
"js": [
"lib/test-api.js"
]
},
"permissions": [
"<all_urls>",
"notifications",
"storage",
"videoCapture"
]
}
我有一个运行eval 的脚本文件。我已阅读有关 CSP 和沙盒的信息,但我仍然收到此错误:
拒绝将字符串评估为 JavaScript,因为 'unsafe-eval' 是 在以下内容安全中不是允许的脚本来源 策略指令:“default-src 'self' chrome-extension-resource:”。 请注意,'script-src' 没有明确设置,所以 'default-src' 是 用作后备。
【问题讨论】:
标签: javascript google-chrome manifest google-chrome-app content-security-policy