W3C home > Mailing lists > Public > public-html@w3.org > March 2011

Re: Newly-created browsing contexts and about:blank

From: Henri Sivonen <hsivonen@iki.fi>
Date: Mon, 7 Mar 2011 13:22:55 +0200
Cc: HTML WG <public-html@w3.org>
Message-Id: <826B070F-FDD4-4271-B9A1-B3FF0083C1F3@iki.fi>
To: Adam Barth <w3c@adambarth.com>
On Mar 3, 2011, at 23:21, Adam Barth wrote:

> A conceptual model that seems to make sense here is the following:
> 
> 1) When frames are created (either iframes or main frames), they're
> created with a blank document.  That's why it's synchronous and the
> load even doesn't fire: the document came into existence with the
> frame.
> 
> 2) Then, we perform an asynchronous navigation to the desired URL
> (whether about:blank or otherwise).
> 
> 3) For about:blank, the load completes atomically (which makes sense
> because it's internal) and the load event fires as usual.

The problem with this model in Gecko is that the synchronous initial about:blank is semi-useless and confusing for authors. The author's script sees one about:blank, maybe adds stuff there using DOM manipulation and then the other about:blank loads and blows away whatever the author put in the first one.

So the merit of Gecko's current model is that works with existing pages and test cases that already work in Gecko (obviously). The synchronous part is rather useless for authors beyond avoiding scripts crashing when scripts try to poke null document.body or something of that nature.

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Monday, 7 March 2011 11:23:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:23 UTC