![](/img/trans.png)
[英]Chrome Extension (Manifest v3) call Google Apps Script deployed as WebApp with OAuth2
[英]Can't use firebase db to build chrome extension in manifest v3?
我正在尝试构建一个 chrome 扩展,它在我的content.js
文件中使用 firebase 作为数据库,但它不起作用。 我正在使用v3
清单。 但是我无法导入 firebase。
我尝试使用此资源在我的项目中设置 firebase。 我还尝试从firebase-app.js和firebase-database.js下载源代码,并使用导入
const firebase = chrome.extension.getURL('./firebase-app.js');
但是这个文件有来自
https://www.gstatic.com/firebasejs/9.15.0/firebase-app.js
这违反了content_security_policy
,我得到了这个错误
Refused to load the script ‘https://www.gstatic.com/firebasejs/9.15.0/firebase-app.js’ because it violates the following Content Security Policy directive: “script-src ‘self’ ‘wasm-unsafe-eval’“. Note that ‘script-src-elem’ was not explicitly set, so ‘script-src’ is used as a fallback.
我知道外部代码限制。
在 vanilla JS 实现中是否有任何解决方法?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.