【发布时间】:2014-03-01 05:39:30
【问题描述】:
使用 html5 沙盒 iframe 时,我希望 iframe 无法更改其位置:
<iframe sandbox="allow-forms allow-popups allow-pointer-lock allow-same-origin allow-scripts" class="iframe visible" src="thesource.html" width="100%" scrolling="auto" frameborder="0"></iframe>
它在 Chrome 中运行良好,但在 Firefox 中,沙盒 iframe 仍然可以重定向。
它是一个known bug,但我怎样才能修补它以使所有 Firefox 用户都不会被重定向?
【问题讨论】:
-
Iframes 通常是很好的沙盒,所以如果浏览器没有启用某些东西(或者被窃听并且不起作用),我认为不可能找到解决方法你。
-
你需要这个干什么?也许知道这将有助于找到确切的问题。
标签: javascript html firefox iframe