我正在尝试将 chrome://history-frame 加载到我的扩展页面的 iframe 中,但它给出了:
XMLHttpRequest cannot load chrome://history-frame/. Cross origin requests are only supported for HTTP.
我尝试将 url 添加到 manifest.json 中的权限元素,并将其添加为:
"content_security_policy": "script-src 'self' chrome://history-frame; object-src 'self'"
有人知道如何将其加载到 iframe 中吗?
最佳答案
不允许扩展程序在 iframe 中使用 chrome://
方案加载来源( nor is it allowed 以在 CSP 中将此类来源列入白名单)。
关于javascript - 允许 chrome ://history-frame to load in an iframe 的任何方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21020620/