Prevent target=“_top” from taking over UI in Mozilla Chromeless

天涯浪子 提交于 2020-01-06 02:37:26

问题


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.


回答1:


Sorry, you can't do this with HTML frames, you have to use <xul:browser type="content-primary"/> or equivalent.



来源:https://stackoverflow.com/questions/5463429/prevent-target-top-from-taking-over-ui-in-mozilla-chromeless

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!