我正在尝试创建一个使用 google earth API 的打包应用程序。但是,在运行该应用程序时,我收到一条错误消息:
Refused to load the script 'https://www.google.com/jsapi' because it violates the following Content Security Policy directive: "default-src 'self' chrome-extension-resource:". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
所以我在清单中添加了一行,上面写着
"content_security_policy": "script-src 'self' https://www.google.com/jsapi; object-src 'self'",
但是,现在 chrome 抱怨并显示以下错误:
There were warnings when trying to install this extension:
'content_security_policy' is only allowed for extensions and legacy packaged apps, and this is a packaged app.