On Tue, 23 Jun 2009, Jonas Sicking wrote:
> >
> > Does the <span id=where> get parsed as a child of “div#a > span” in
> > the parent browsing context, or in child.html?
>
> In gecko I believe we parse into the parent browsing context.
That matches HTML5 also. (Assuming we change DOM3 Core to not require node
adoption, anyway, but I think that's pretty much a given now.)
> Another interesting case is if the <span id=where> is instead a <script
> id=where>. Does that script execute in the parent browsing context or
> the child browsing context. In gecko it will execute in the parent I
> believe, but in HTML 5 I think it'll execute in the child since it's the
> parser that executes scripts.
In HTML5 the parser executes the script but it does so based on where the
element was placed, which in this case would mean it executes in the
context of the parent browser context also. In particular, if the script
contains a document.write() call, assuming the parent document has no
active parser, it'll blow away the parent document (by implying a
document.open() call on the parent).
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'