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

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 UTC