- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Wed, 16 May 2012 16:54:33 -0700
- To: Jonas Sicking <jonas@sicking.cc>
- Cc: Rafael Weinstein <rafaelw@google.com>, Yehuda Katz <wycats@gmail.com>, Henri Sivonen <hsivonen@iki.fi>, Webapps WG <public-webapps@w3.org>, Scott González <scott.gonzalez@gmail.com>
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