阻止目标=“_top”从Mozilla Chromeless接管UI [英] Prevent target="_top" from taking over UI in Mozilla Chromeless
问题描述
Chromeless基本上是没有它的UI的Firefox。您可以使用HTML,CSS和JavaScript构建自己的UI。标签/窗口被加载到iframe中。主框架(浏览器UI)具有特殊的权限,可以控制iframe。 iframes认为它们是top文档(
top === self
)。 几个问题与他们已经实现这些沙盒iframe的方式。其中之一是在浏览器UI中加载与 target =_ top
的链接;不在iframe中。他们不尊重iframe沙盒。
显然这会导致一些问题,如果任何人想要实现一个真正的浏览器chromeless。
如果您熟悉Chromeless,Gecko / XulRunner,firefox和/或构建firefox扩展,并且知道我应该修改哪些位置以及如何通过强制来进一步锁定iframe沙盒, _top
永远等于iframe self
请给我个提示。
对不起,您不能使用HTML框架来做到这一点,您必须使用< xul:browser type =content-primary/>
或同等学历。
I know a fix for this is coming soon; I'm just hoping to get a head start.
Chromeless is basically Firefox without it's UI. You can build your own UI using HTML, CSS, and javascript. Tabs/windows are loaded in iframes. The main frame (the browser UI) has special priviledges that allow it to control the iframes. The iframes think they are the "top" document (top === self
).
There have been a couple issues with the way they have implemented these sandboxed iframes. One of which is that links with target="_top"
are loaded in the browser UI; not in the iframe. They do NOT respect the iframe sandbox.
Obviously this causes some problems if anyone wants to implement a real browser in chromeless.
If you are familiar with Chromeless, Gecko/XulRunner, firefox, and/or building firefox extensions and have an idea as to where and what I should modify to further lock down the iframe sandbox by forcing _top
to always equal the iframe self
please give me a hint.
Sorry, you can't do this with HTML frames, you have to use <xul:browser type="content-primary"/>
or equivalent.
这篇关于阻止目标=“_top”从Mozilla Chromeless接管UI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!