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

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Tue, 23 Jun 2009 17:13:54 -0700
Message-ID: <63df84f0906231713r522e9aafq9e659c66be3b48c1@mail.gmail.com>
To: Travis Leithead <Travis.Leithead@microsoft.com>
Cc: "public-html@w3.org" <public-html@w3.org>, Ian Hickson <ian@hixie.ch>
On Tue, Jun 23, 2009 at 5:02 PM, Travis
Leithead<Travis.Leithead@microsoft.com> wrote:
> [parent browsing context]
> …
> <iframe src=child.html></iframe>
> <div id=attach></div>
> …
>
> [child.html (assuming same-domain access is allowed to parent markup)]
>
> <html>
>   <body>
>     <div id=a>
>       <span>
>         <script>
>           window.parent.document.getElementById(‘attach’).appendChild(
> document.getElementById(‘a’) );
>         </script>
>         <span id=where>Where does this get parsed?
>         </span>
>       </span>
>     </div>
>   </body>
> </html>
>
>
> 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.

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.

/ Jonas
Received on Wednesday, 24 June 2009 00:14:54 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:04 UTC