阻止目标=“_top”从Mozilla Chromeless接管UI(Prevent target="_top" from taking over UI in Mozilla Chromeless)

其他开发 IT屋
问 题

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.

本文地址:IT屋 » Prevent target=&quot;_top&quot; 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”/> 或同等学历。


本文地址:IT屋 » 阻止目标=“_top”从Mozilla Chromeless接管UI