我想在我的 popup.html 中添加 google api 但 cosole 中出现错误
Refused to load the script 'https://apis.google.com/js/api.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' https://cdn.jsdelivr.net". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.
Run Code Online (Sandbox Code Playgroud)
有人能帮助我吗?在清单中我添加了
"content_security_policy": "script-src 'self' https://apis.google.com/js/api.js; object-src 'self'",
Run Code Online (Sandbox Code Playgroud)
但它不起作用。请帮助我,提前致谢
我想用一个数字创建数组。是否可以?
在 array = 60 中,我的意思是 array[1, 2, 3 ...60],但我想要这个数组只有一个数字。
我想要这样的东西。
JavaScript:
let array = 60;
const map1 = array.map(x => console.log(x));
Run Code Online (Sandbox Code Playgroud)
console.log 必须出现 60 次。