W3C home > Mailing lists > Public > public-html-commits@w3.org > December 2008

html5/spec Overview.html,1.1682,1.1683

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 02 Dec 2008 04:36:02 +0000
To: public-html-commits@w3.org
Message-Id: <E1L7MzS-0005dB-Nh@lionel-hutz.w3.org>

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv21616

Modified Files:
	Overview.html 
Log Message:
Attempt to define that <script>document.write('<script src=a.js><'+'/script>1');document.write('2<script src=a.js><'+'/script>');</script> must output 12 not 21. (whatwg r2512)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1682
retrieving revision 1.1683
diff -u -d -r1.1682 -r1.1683
--- Overview.html	2 Dec 2008 04:10:40 -0000	1.1682
+++ Overview.html	2 Dec 2008 04:35:59 -0000	1.1683
@@ -36142,7 +36142,9 @@
 &lt;/script&gt;
 ...</pre>
 
-  </div><h4 id=the-input-stream><span class=secno>8.2.2 </span>The <dfn>input stream</dfn></h4><p>The stream of Unicode characters that consists the input to the
+  </div><p>To handle these cases, parsers have a <dfn id=script-nesting-level>script nesting
+  level</dfn>, which must be initially set to zero, and a <dfn id=parser-pause-flag>parser
+  pause flag</dfn>, which must be initially set to false.<h4 id=the-input-stream><span class=secno>8.2.2 </span>The <dfn>input stream</dfn></h4><p>The stream of Unicode characters that consists the input to the
   tokenization stage will be initially seen by the user agent as a
   stream of bytes (typically coming over the network or from the local
   file system). The bytes encode the actual characters according to a
@@ -37029,12 +37031,16 @@
   tree construction stage, that is a <a href=#parse-error>parse error</a>.<p>When an end tag token is emitted, the <a href=#content-model-flag>content model
   flag</a> must be switched to the PCDATA state.<p>When an end tag token is emitted with attributes, that is a
   <a href=#parse-error>parse error</a>.<p>When an end tag token is emitted with its <i>self-closing
-  flag</i> set, that is a <a href=#parse-error>parse error</a>.<p>Before each step of the tokeniser, the user agent may check to
-  see if either one of the scripts in the <a href=#list-of-scripts-that-will-execute-as-soon-as-possible>list of scripts that
-  will execute as soon as possible</a> or the first script in the
-  <a href=#list-of-scripts-that-will-execute-asynchronously>list of scripts that will execute asynchronously</a>, has
-  <a href=#completed-loading>completed loading</a>. If one has, then it must be <a href=#executing-a-script-block title="executing a script block">executed</a> and removed from
-  its list.<p>The tokeniser state machine consists of the states defined in the
+  flag</i> set, that is a <a href=#parse-error>parse error</a>.<p>Before each step of the tokeniser, the user agent must first
+  check the <a href=#parser-pause-flag>parser pause flag</a>. If it is true, then the
+  tokeniser must abort the processing of any nested invocations of the
+  tokeniser, yielding control back to the caller. If it is false, then
+  the user agent may then check to see if either one of the scripts in
+  the <a href=#list-of-scripts-that-will-execute-as-soon-as-possible>list of scripts that will execute as soon as
+  possible</a> or the first script in the <a href=#list-of-scripts-that-will-execute-asynchronously>list of scripts
+  that will execute asynchronously</a>, has <a href=#completed-loading>completed
+  loading</a>. If one has, then it must be <a href=#executing-a-script-block title="executing a
+  script block">executed</a> and removed from its list.<p>The tokeniser state machine consists of the states defined in the
   following subsections.</p><!-- XXX should go through these reordering the entries so that
   they're in some consistent order, like, by Unicode, errors last, or
   something --><h5 id=data-state><span class=secno>8.2.4.1 </span><dfn>Data state</dfn></h5><p>Consume the <a href=#next-input-character>next input character</a>:<dl class=switch><dt>U+0026 AMPERSAND (&amp;)</dt>
@@ -40045,11 +40051,18 @@
     the <a href=#insertion-point>insertion point</a> be just before the <a href=#next-input-character>next
     input character</a>.</p>
 
+    <p>Increment the parser's <a href=#script-nesting-level>script nesting level</a> by
+    one.</p>
+
     <p><a href=#running-a-script title="running a script">Run</a> the <var title="">script</var>. This might cause some script to execute,
     which might cause <a href=#dom-document-write-html title=dom-document-write-HTML>new
     characters to be inserted into the tokeniser</a>, and might
     cause the tokeniser to output more tokens, resulting in a <a href=#nestedParsing>reentrant invocation of the parser</a>.</p>
 
+    <p>Decrement the parser's <a href=#script-nesting-level>script nesting level</a> by
+    one. If the parser's <a href=#script-nesting-level>script nesting level</a> is zero,
+    then set the <a href=#parser-pause-flag>parser pause flag</a> to false.</p>
+
     <p>Let the <a href=#insertion-point>insertion point</a> have the value of the
     <var title="">old insertion point</var>. (In other words,
     restore the <a href=#insertion-point>insertion point</a> to the value it had
@@ -40062,10 +40075,11 @@
     <dl class=switch><dt>If the tree construction stage is <a href=#nestedParsing>being called reentrantly</a>, say from a
      call to <code title=dom-document-write-HTML><a href=#dom-document-write-html>document.write()</a></code>:</dt>
 
-     <dd><p>Abort the processing of any nested invocations of the
-     tokeniser, yielding control back to the caller. (Tokenization
-     will resume when the caller returns to the "outer" tree
-     construction stage.)</dd>
+     <dd><p>Set the <a href=#parser-pause-flag>parser pause flag</a> to true, and abort
+     the processing of any nested invocations of the tokeniser,
+     yielding control back to the caller. (Tokenization will resume
+     when the caller returns to the "outer" tree construction
+     stage.)</dd>
 
 
      <dt>Otherwise:</dt>
Received on Tuesday, 2 December 2008 04:36:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 December 2008 04:36:13 GMT