问题
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