文件:// XUL浏览器中的链接



我试图让Firefox应用程序中的XUL浏览器显示来自"file://"位置的图像,来自http://localhost的页面。

我正在用Firefox 30运行这个应用程序。

我试过了,但是没有用:

var branch = browser.preferences.getBranch("capability.policy");
branch.setCharPref("policynames", "localfilelinks");
branch.setCharPref("localfilelinks.sites", "http://localhost");
branch.setCharPref("localfilelinks.checkloaduri.enabled", "allAccess");

允许文件链接的正确方法是什么

我不认为这是一个好主意运行file://内容在http://。为什么不能使用chrome://http://作为图像。chrome:// url很容易定位,他们总是与你的应用程序。

最新更新