Re: [NavigationTiming] Issues in the document.open test (or perhaps in the spec, if the test is correct)

On Sun, 24 Jun 2012, Boris Zbarsky wrote:

> On 6/22/12 5:53 PM, Boris Zbarsky wrote:
>> That said, I think this spec could really benefit from an actual
>> definition of "navigation". The definition could explicitly exclude
>> document.open, which would have the same effect in terms of normative
>> requirements.
>
> I feel like I need to state this more clearly (and perhaps more forcefully), 
> actually.
>
> In browsers, the behavior of document.open/write/close involves the 
> following:
>
> * Firing beforeunload and unload on the Window.
> * Creation of a new Window.
> * Parsing of some data and creation of a new DOM tree, loading
>  of subresources.
> * Firing load on the new Window.

It is worth noting that HTML defines the expected behaviour here rather 
precisely [1]. My naive expectation is that the "Replace the Document's 
singleton objects with new instances of those objects" would apply to any 
navigation timing related objects, so no data would be preserved across 
document.open.

[1] 
http://www.whatwg.org/specs/web-apps/current-work/#opening-the-input-stream

Received on Sunday, 24 June 2012 09:22:28 UTC