Skip to content
Permalink
Browse files
[cgiowt] (2) Update the fragment parsing algorithm to handle <script>…
… more theoretically properly. And mention a quicker implementation strategy.

Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8099

git-svn-id: http://svn.whatwg.org/webapps@4457 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 4, 2010
1 parent 9131522 commit fb96ebf
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 10 deletions.
@@ -108,7 +108,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<hgroup><h1>Web Applications 1.0</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 21 December 2009</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 4 January 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -76711,13 +76711,18 @@ <h3 id=parsing-html-fragments><span class=secno>11.5 </span>Parsing HTML fragmen
<dd>Switch the tokenizer to the <a href=#rcdata-state>RCDATA state</a>.</dd>


<dt>If it is a <code><a href=#the-style-element>style</a></code>, <code><a href=#script>script</a></code>,
<code><a href=#xmp>xmp</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#noembed>noembed</a></code>, or
<dt>If it is a <code><a href=#the-style-element>style</a></code>, <code><a href=#xmp>xmp</a></code>,
<code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#noembed>noembed</a></code>, or
<code><a href=#noframes>noframes</a></code> element</dt>

<dd>Switch the tokenizer to the <a href=#rawtext-state>RAWTEXT state</a>.</dd>


<dt>If it is a <code><a href=#script>script</a></code> element</dt>

<dd>Switch the tokenizer to the <a href=#script-data-state>script data state</a>.</dd>


<dt>If it is a <code><a href=#the-noscript-element>noscript</a></code> element</dt>

<dd>If the <a href=#scripting-flag>scripting flag</a> is enabled, switch the
@@ -76735,7 +76740,15 @@ <h3 id=parsing-html-fragments><span class=secno>11.5 </span>Parsing HTML fragmen

<dd>Leave the tokenizer in the <a href=#data-state>data state</a>.</dd>

</dl></li>
</dl><p class=note>For performance reasons, an implementation that
uses the actual state machine described in this specification
directly could use the PLAINTEXT state instead of the RAWTEXT
and script data states where those are mentioned in the list
above. They are equivalent, since there is no <a href=#appropriate-end-tag-token>appropriate
end tag token</a> in the fragment case, but involve far fewer
state transitions.</p>

</li>

<li>

21 index
@@ -110,7 +110,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<hgroup><h1>WHATWG HTML (Including HTML5)</h1>
<h2 class="no-num no-toc">Draft Standard &mdash; 21 December 2009</h2>
<h2 class="no-num no-toc">Draft Standard &mdash; 4 January 2010</h2>
</hgroup><p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -68338,13 +68338,18 @@ document.body.appendChild(text);
<dd>Switch the tokenizer to the <a href=#rcdata-state>RCDATA state</a>.</dd>


<dt>If it is a <code><a href=#the-style-element>style</a></code>, <code><a href=#script>script</a></code>,
<code><a href=#xmp>xmp</a></code>, <code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#noembed>noembed</a></code>, or
<dt>If it is a <code><a href=#the-style-element>style</a></code>, <code><a href=#xmp>xmp</a></code>,
<code><a href=#the-iframe-element>iframe</a></code>, <code><a href=#noembed>noembed</a></code>, or
<code><a href=#noframes>noframes</a></code> element</dt>

<dd>Switch the tokenizer to the <a href=#rawtext-state>RAWTEXT state</a>.</dd>


<dt>If it is a <code><a href=#script>script</a></code> element</dt>

<dd>Switch the tokenizer to the <a href=#script-data-state>script data state</a>.</dd>


<dt>If it is a <code><a href=#the-noscript-element>noscript</a></code> element</dt>

<dd>If the <a href=#scripting-flag>scripting flag</a> is enabled, switch the
@@ -68362,7 +68367,15 @@ document.body.appendChild(text);

<dd>Leave the tokenizer in the <a href=#data-state>data state</a>.</dd>

</dl></li>
</dl><p class=note>For performance reasons, an implementation that
uses the actual state machine described in this specification
directly could use the PLAINTEXT state instead of the RAWTEXT
and script data states where those are mentioned in the list
above. They are equivalent, since there is no <a href=#appropriate-end-tag-token>appropriate
end tag token</a> in the fragment case, but involve far fewer
state transitions.</p>

</li>

<li>

17 source
@@ -87469,13 +87469,18 @@ document.body.appendChild(text);
<dd>Switch the tokenizer to the <span>RCDATA state</span>.</dd>


<dt>If it is a <code>style</code>, <code>script</code>,
<code>xmp</code>, <code>iframe</code>, <code>noembed</code>, or
<dt>If it is a <code>style</code>, <code>xmp</code>,
<code>iframe</code>, <code>noembed</code>, or
<code>noframes</code> element</dt>

<dd>Switch the tokenizer to the <span>RAWTEXT state</span>.</dd>


<dt>If it is a <code>script</code> element</dt>

<dd>Switch the tokenizer to the <span>script data state</span>.</dd>


<dt>If it is a <code>noscript</code> element</dt>

<dd>If the <span>scripting flag</span> is enabled, switch the
@@ -87495,6 +87500,14 @@ document.body.appendChild(text);

</dl>

<p class="note">For performance reasons, an implementation that
uses the actual state machine described in this specification
directly could use the PLAINTEXT state instead of the RAWTEXT
and script data states where those are mentioned in the list
above. They are equivalent, since there is no <span>appropriate
end tag token</span> in the fragment case, but involve far fewer
state transitions.</p>

</li>

<li>

0 comments on commit fb96ebf

Please sign in to comment.