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

On Wed, May 16, 2012 at 4:49 PM, Jonas Sicking <jonas@sicking.cc> wrote:
> So if I understand things correctly, that would mean that:
>
> document.parse("parsed as text<script>parsed as script
> content</script><tr><td>table content</td></tr>");
>
> would return a fragment like:
> #fragment
>  #text "parsed as text"
>  script
>    #text parsed as script content
>  tr
>    td
>      #text table content
>
> Is this correct? The important part here is that the contents of the
> <script> element is parsed according to the rules which normally apply
> when parsing scripts?

Yes.  The initial new contextless parsing mode would just emit the
text at the beginning, process the <script> as if it was in-head,
switch back to the contextless mode, then finally see the <tr> and
switch to "in-table-body".  From then on it's normal HTML processing.

~TJ

Received on Wednesday, 16 May 2012 23:55:22 UTC