[whatwg] about:blank synchronicity

Henri Sivonen hsivonen at iki.fi
Thu Jan 14 00:20:10 PST 2010


On Jan 13, 2010, at 19:08, Boris Zbarsky wrote:

> On 1/13/10 11:52 AM, Maciej Stachowiak wrote:
>> It seems like if Gecko truly wanted to make about:blank synchronous, it
>> should be possible simply by special-casing its load and performing a
>> series of DOM calls right then and there, without ever involving the
>> parser.
> 
> Turns out this actually breaks at least some things that expect (asynchronous) onload events and the like for the about:blank load, at least when Henri tried doing exactly that.  I _think_ this was for cases where an explicit about:blank was listed as the src.

I did it after absent or empty src had been defaulted to about:blank: so empty, absent and explicit about:blank were all covered. Also, I did it for all browsing contexts--not just iframes.

The most obvious test case that broke was testing history navigation in a top-level browsing context (i.e. created in XUL--not as an iframe).

It is plausible that my attempt to fix was too naïve and additional tweaking of the events could work. (It is indeed very likely that my attempted fix was too naïve.) Also, making the change only for frames but not for top-level browsing contexts might be worth considering if changing this for top-level browsing contexts is too disruptive.

Which leads to the question: Are there known Web compat constraints on navigating a non-framed browsing context to about:blank via window.open() or window.location.href in a previously open()ed window?

-- 
Henri Sivonen
hsivonen at iki.fi
http://hsivonen.iki.fi/





More information about the whatwg mailing list