On 5/13/11 4:46 PM, Ian Hickson wrote:
The sum total of what the spec has to say on the matter is "User agents
may support secondary browsing contexts, which are browsing contexts that
form part of the user agent's interface, apart from the main content
area"; I think it's perfectly reasonable for a user agent that implements
such a thing to have an applicable specification that defines specific
behaviour for its secondary browsing contexts that open links wherever
they want.
OK, I see.
In addition, there is existing deployed content using the special names
to target the main content area which would break if the special-casing
of those names were removed.... so I doubt it'll be removed.
Ah, interesting. Do you have any links to such documents so I could study
them? What do these links do in other browsers?
I don't have links offhand, unfortunately; just past sidebar things I've
used and now forgotten the location of plus documentation on the web
about authoring things with target="_main" [1].
I just tested what this document does in the main content area:
<!DOCTYPE html>
<a href="http://web.mit.edu" target="_main">Click me</a>
It looks like this opens a new browsing area in WebKit and Presto and
loads the link in the tab I clicked the link in in Gecko and Trident
(IE9). I did not test the exact Trident behavior here; the Gecko
behavior is that in the content area "_main" is an alias for "_top" (as
opposed to targeting the currently open tab, say). A bit of testing
seems to suggest that Trident treats it as an alias for "_self" in at
least some cases, corroborated by some threads out there [2].
A similar document with target="_content" loads in a new browsing area
in all the non-Gecko browsers; I can probably remove support for this
from Gecko as well.
I did some googling just now, and pretty quickly found an actual web
page that uses target="_main": http://www.ejflavors.com/orangemoon/
The question of how to proceed here is a good one. Supporting different
targeting algorithms in different browsing contexts is a bit of a pain,
so it would be good, imo, if we could converge the targeting algorithms
for primary and secondary browsing contexts for fixed names.... That
said, for target="_main" even the primary browsing context interop story
is sad, apparently.
-Boris
[1] http://www.howtocreate.co.uk/tutorials/jsexamples/createSidebar.php
http://msdn.microsoft.com/en-us/library/aa753632%28v=vs.85%29.aspx
http://forum.maxthon.com/viewthread.php?tid=21723
[2]
http://www.windowskb.com/Uwe/Forum.aspx/ie6/76031/Link-in-a-frame-page-in-full-browser-window