我正在尝试将chrome:// history-frame加载到我的扩展程序页面的iframe中,但它给出了:
XMLHttpRequest cannot load chrome://history-frame/. Cross origin requests are only supported for HTTP.
我尝试将网址添加到manifest.json中的权限元素中,并将其添加为:
"content_security_policy": "script-src 'self' chrome://history-frame; object-src 'self'"
有人对我如何将其加载到iframe中有任何想法吗?
最佳答案
扩展不允许在iframe中使用chrome://
方案加载原点(nor is it allowed在CSP中将此类原点列入白名单)。