W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: Implied Context Parsing (DocumentFragment.innerHTML, or similar) proposal details to be sorted out

From: Jonas Sicking <jonas@sicking.cc>
Date: Sat, 16 Jun 2012 02:23:22 +0200
Message-ID: <CA+c2ei99_Ov8avB-b3qN-ZCyWYJOo7-NMH-gAQQjBGVS_wciLw@mail.gmail.com>
To: Henri Sivonen <hsivonen@iki.fi>
Cc: Scott González <scott.gonzalez@gmail.com>, Rafael Weinstein <rafaelw@google.com>, Webapps WG <public-webapps@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>, Yehuda Katz <wycats@gmail.com>, Ryosuke Niwa <rniwa@webkit.org>
On Jun 11, 2012 2:06 PM, "Henri Sivonen" <hsivonen@iki.fi> wrote:
>
> On Fri, Jun 8, 2012 at 11:03 PM, Yehuda Katz <wycats@gmail.com> wrote:
> > It's intentional. If you look at the implementation, we explicitly
extract
> > the <script> tags and use our globalEval implementation to execute them.
>
> Okay. Let's make document.parse() make scripts executable, then, for
> consistency with what script libraries want. I think it will be a
> total foot gun when a fragment contains more than one script, though.

Just so everyone vi för the same page, this means that <script> elements
will stay vi the DOM where they appear in the markup, but won't execute
before document.parse returns. Once the DOM fragment vi inserted inline
<script>s will sychronously execute in depth-first order. They execute
after the whole fragment has been inserted, but before the insertion
function has returned.

Correct?

/ Jonas
Received on Saturday, 16 June 2012 00:23:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:52 GMT