Re: [dom] Need to describe the interaction of adoptNode with prototype chains

On 12/24/12 4:36 PM, David Bruant wrote:
> I thought the global changed.

The global inside the navigation context changed, but existing objects 
already have an existing global.

> document.open Step 14 suggests that the
> Window object changes... unless it's referring to the Window
> "constructor" and not the window instance as I understand it?

It's referring to both, but it's changed if you get it again, not if 
you've gotten it previously.

> Yes. It mixed up all terms in my head. Sorry about that. I was talking
> about navigation all along; assuming a new form of navigation preserving
> the document identity could exist. But I was wrong apparently. I thought
> the global changed, but it doesn't seem to.

Please define "changed".  ;)

> Hmm... Playing with this example a bit more I've found that Gecko and
> Chrome deviates in their behavior. Gecko only preserves the lexical
> environment for the functions in the pre-document.open scripts and
> deletes the binding to the global object while Chrome preserves the
> binding to the global object.

Chrome doesn't implement the document.open() parts of the spec very well 
at all.  It doesn't create a new Window, doesn't clear event listeners, etc.

So testing the behavior of document.open() in Chrome is fairly pointless.

> I fail to observe the step 14 in Chrome including the "change all the
> prototypes" part, so I guess it's not web-crucial.

It's pretty crucial last I checked.  There are various things broken in 
Chrome because of its behavior here.

> It could be re-spec'ed as the same thing without step 14. I think it
> would save a lot of trouble. What do you think?

I think we tried that in Gecko at one point and it wasn't web-compatible 
enough.

-Boris

Received on Tuesday, 25 December 2012 01:27:19 UTC