W3C home > Mailing lists > Public > public-html@w3.org > June 2009

RE: (HTML5 Parsing) Yet another corner-case: parsing into other contexts...

From: Travis Leithead <Travis.Leithead@microsoft.com>
Date: Wed, 24 Jun 2009 03:50:21 +0000
To: Ian Hickson <ian@hixie.ch>, Jonas Sicking <jonas@sicking.cc>
CC: "public-html@w3.org" <public-html@w3.org>
Message-ID: <49142F02149340458FDD20841AD0AD5602370A@TK5EX14MBXW653.wingroup.windeploy.ntdev.microsoft.com>
Thanks, this helps. Keep up the good work.

By the way, I think that you've got a typo in the "in_body" insertion mode, in both the algorithm for handling the start tag whose name is "li" as well as the start tag whose name is one of "dd" or "dt":
* Step 5 of the algorithms indicate to "return to step 2," but I think you mean step _3_.



-----Original Message-----
From: Ian Hickson [mailto:ian@hixie.ch]
Sent: Tuesday, June 23, 2009 5:25 PM
To: Jonas Sicking
Cc: Travis Leithead; public-html@w3.org
Subject: Re: (HTML5 Parsing) Yet another corner-case: parsing into other contexts...

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.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 24 June 2009 03:51:03 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:44:49 UTC