[html5] r7484 - [giow] (2) The parser should have mutation observers. Affected topics: HTML, HTM [...]
whatwg at whatwg.org
whatwg at whatwg.org
Tue Oct 23 15:24:20 PDT 2012
Author: ianh
Date: 2012-10-23 15:24:19 -0700 (Tue, 23 Oct 2012)
New Revision: 7484
Modified:
complete.html
index
source
Log:
[giow] (2) The parser should have mutation observers.
Affected topics: HTML, HTML Syntax and Parsing
Modified: complete.html
===================================================================
--- complete.html 2012-10-23 22:07:11 UTC (rev 7483)
+++ complete.html 2012-10-23 22:24:19 UTC (rev 7484)
@@ -92147,14 +92147,11 @@
<td>One <code><a href=#text>Text</a></code> node before the table, containing "A BC" (A-space-B-C), and one <code><a href=#text>Text</a></code> node inside the table (as a child of a <code><a href=#the-tbody-element>tbody</a></code>) with a single space character. (Space characters separated from non-space characters by non-character tokens are not affected by <a href=#foster-parent title="foster parent">foster parenting</a>, even if those other tokens then get ignored.)
</table></div>
- <p id=mutation-during-parsing>DOM mutation events and mutation
- observers must not fire for changes caused by the UA parsing the
- document. (Conceptually, the parser is not mutating the DOM, it is
- constructing it.) This includes the parsing of any content inserted
- using <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code> and
- <code title=dom-document-writeln><a href=#dom-document-writeln>document.writeln()</a></code> calls.
- <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
+ <p id=mutation-during-parsing>DOM mutation events must not fire for changes caused by the UA
+ parsing the document. This includes the parsing of any content inserted using <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code> and <code title=dom-document-writeln><a href=#dom-document-writeln>document.writeln()</a></code> calls. <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
+ <p>However, mutation observers <em>do</em> fire, as required by the DOM Core specification.</p>
+
<p class=note>Not all of the tag names mentioned below are
conformant tag names in this specification; many are included to
handle legacy content. They still form part of the algorithm that
@@ -94365,6 +94362,8 @@
<dt id=scriptEndTag>An end tag whose tag name is "script"</dt>
<dd>
+ <p><a href=#perform-a-microtask-checkpoint>Perform a microtask checkpoint</a>.</p>
+
<p><a href=#provide-a-stable-state>Provide a stable state</a>.</p>
<p>Let <var title="">script</var> be the <a href=#current-node>current node</a>
@@ -96884,17 +96883,14 @@
<code><a href=#document>Document</a></code> object when it is created, or creates one
implicitly.</p>
- <p>This <code><a href=#document>Document</a></code> must then be populated with DOM nodes
- that represent the tree structure of the input passed to the parser,
- as defined by the XML specification, the Namespaces in XML
- specification, and the DOM Core specification. DOM mutation events
- must not fire for the operations that the <a href=#xml-parser>XML parser</a>
- performs on the <code><a href=#document>Document</a></code>'s tree, but the user agent
- must act as if elements and attributes were individually appended
- and set respectively so as to trigger rules in this specification
- regarding what happens when an element is inserted into a document
- or has its attributes set. <a href=#refsXML>[XML]</a> <a href=#refsXMLNS>[XMLNS]</a> <a href=#refsDOMCORE>[DOMCORE]</a>
- <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
+ <p>This <code><a href=#document>Document</a></code> must then be populated with DOM nodes that represent the tree
+ structure of the input passed to the parser, as defined by the XML specification, the Namespaces
+ in XML specification, and the DOM Core specification. DOM mutation events must not fire for the
+ operations that the <a href=#xml-parser>XML parser</a> performs on the <code><a href=#document>Document</a></code>'s tree, but the
+ user agent must act as if elements and attributes were individually appended and set respectively
+ so as to trigger rules in this specification regarding what happens when an element is inserted
+ into a document or has its attributes set, and the DOM Core specification's requirements regarding
+ mutation observers mean that mutation observers <em>are</em> fired (unlike mutation events). <a href=#refsXML>[XML]</a> <a href=#refsXMLNS>[XMLNS]</a> <a href=#refsDOMCORE>[DOMCORE]</a> <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
<p>Between the time an element's start tag is parsed and the time
either the element's end tag is parsed or the parser detects a
@@ -96933,17 +96929,14 @@
an interoperable fashion without requiring any network access for
handling external subsets. <a href=#refsXML>[XML]</a></p>
- <p id=scriptTagXML>When an <a href=#xml-parser>XML parser</a> creates a
- <code><a href=#the-script-element>script</a></code> element, it must be marked as being
- <a href=#parser-inserted>"parser-inserted"</a> and its <a href=#force-async>"force-async"</a>
- flag must be unset. If the parser was originally created for the
- <a href=#xml-fragment-parsing-algorithm>XML fragment parsing algorithm</a>, then the element must
- be marked as <a href=#already-started>"already started"</a> also. When the element's
- end tag is parsed, the user agent must <a href=#provide-a-stable-state>provide a stable
- state</a>, and then <a href=#prepare-a-script title="prepare a script">prepare</a>
- the <code><a href=#the-script-element>script</a></code> element. If this causes there to be a
- <a href=#pending-parsing-blocking-script>pending parsing-blocking script</a>, then the user agent
- must run the following steps:</p>
+ <p id=scriptTagXML>When an <a href=#xml-parser>XML parser</a> creates a <code><a href=#the-script-element>script</a></code> element, it
+ must be marked as being <a href=#parser-inserted>"parser-inserted"</a> and its <a href=#force-async>"force-async"</a> flag
+ must be unset. If the parser was originally created for the <a href=#xml-fragment-parsing-algorithm>XML fragment parsing
+ algorithm</a>, then the element must be marked as <a href=#already-started>"already started"</a> also. When the
+ element's end tag is parsed, the user agent must <a href=#perform-a-microtask-checkpoint>perform a microtask checkpoint</a>,
+ <a href=#provide-a-stable-state>provide a stable state</a>, and then <a href=#prepare-a-script title="prepare a script">prepare</a> the
+ <code><a href=#the-script-element>script</a></code> element. If this causes there to be a <a href=#pending-parsing-blocking-script>pending parsing-blocking
+ script</a>, then the user agent must run the following steps:</p>
<ol><li><p>Block this instance of the <a href=#xml-parser>XML parser</a>, such
that the <a href=#event-loop>event loop</a> will not run <a href=#concept-task title=concept-task>tasks</a> that invoke it.</li>
@@ -103234,8 +103227,8 @@
<code title=attr-tdth-colspan><a href=#attr-tdth-colspan>colspan</a></code>;
<code title=attr-tdth-rowspan><a href=#attr-tdth-rowspan>rowspan</a></code>;
<code title=attr-tdth-headers><a href=#attr-tdth-headers>headers</a></code>;
- <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code></td>;
- <code title=attr-th-abbr><a href=#attr-th-abbr>abbr</a></code>
+ <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code>;
+ <code title=attr-th-abbr><a href=#attr-th-abbr>abbr</a></code></td>
<td><code><a href=#htmltableheadercellelement>HTMLTableHeaderCellElement</a></code></td>
<tr><th><code><a href=#the-thead-element>thead</a></code></th>
<td>Group of heading rows in a table</td>
Modified: index
===================================================================
--- index 2012-10-23 22:07:11 UTC (rev 7483)
+++ index 2012-10-23 22:24:19 UTC (rev 7484)
@@ -92147,14 +92147,11 @@
<td>One <code><a href=#text>Text</a></code> node before the table, containing "A BC" (A-space-B-C), and one <code><a href=#text>Text</a></code> node inside the table (as a child of a <code><a href=#the-tbody-element>tbody</a></code>) with a single space character. (Space characters separated from non-space characters by non-character tokens are not affected by <a href=#foster-parent title="foster parent">foster parenting</a>, even if those other tokens then get ignored.)
</table></div>
- <p id=mutation-during-parsing>DOM mutation events and mutation
- observers must not fire for changes caused by the UA parsing the
- document. (Conceptually, the parser is not mutating the DOM, it is
- constructing it.) This includes the parsing of any content inserted
- using <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code> and
- <code title=dom-document-writeln><a href=#dom-document-writeln>document.writeln()</a></code> calls.
- <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
+ <p id=mutation-during-parsing>DOM mutation events must not fire for changes caused by the UA
+ parsing the document. This includes the parsing of any content inserted using <code title=dom-document-write><a href=#dom-document-write>document.write()</a></code> and <code title=dom-document-writeln><a href=#dom-document-writeln>document.writeln()</a></code> calls. <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
+ <p>However, mutation observers <em>do</em> fire, as required by the DOM Core specification.</p>
+
<p class=note>Not all of the tag names mentioned below are
conformant tag names in this specification; many are included to
handle legacy content. They still form part of the algorithm that
@@ -94365,6 +94362,8 @@
<dt id=scriptEndTag>An end tag whose tag name is "script"</dt>
<dd>
+ <p><a href=#perform-a-microtask-checkpoint>Perform a microtask checkpoint</a>.</p>
+
<p><a href=#provide-a-stable-state>Provide a stable state</a>.</p>
<p>Let <var title="">script</var> be the <a href=#current-node>current node</a>
@@ -96884,17 +96883,14 @@
<code><a href=#document>Document</a></code> object when it is created, or creates one
implicitly.</p>
- <p>This <code><a href=#document>Document</a></code> must then be populated with DOM nodes
- that represent the tree structure of the input passed to the parser,
- as defined by the XML specification, the Namespaces in XML
- specification, and the DOM Core specification. DOM mutation events
- must not fire for the operations that the <a href=#xml-parser>XML parser</a>
- performs on the <code><a href=#document>Document</a></code>'s tree, but the user agent
- must act as if elements and attributes were individually appended
- and set respectively so as to trigger rules in this specification
- regarding what happens when an element is inserted into a document
- or has its attributes set. <a href=#refsXML>[XML]</a> <a href=#refsXMLNS>[XMLNS]</a> <a href=#refsDOMCORE>[DOMCORE]</a>
- <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
+ <p>This <code><a href=#document>Document</a></code> must then be populated with DOM nodes that represent the tree
+ structure of the input passed to the parser, as defined by the XML specification, the Namespaces
+ in XML specification, and the DOM Core specification. DOM mutation events must not fire for the
+ operations that the <a href=#xml-parser>XML parser</a> performs on the <code><a href=#document>Document</a></code>'s tree, but the
+ user agent must act as if elements and attributes were individually appended and set respectively
+ so as to trigger rules in this specification regarding what happens when an element is inserted
+ into a document or has its attributes set, and the DOM Core specification's requirements regarding
+ mutation observers mean that mutation observers <em>are</em> fired (unlike mutation events). <a href=#refsXML>[XML]</a> <a href=#refsXMLNS>[XMLNS]</a> <a href=#refsDOMCORE>[DOMCORE]</a> <a href=#refsDOMEVENTS>[DOMEVENTS]</a></p>
<p>Between the time an element's start tag is parsed and the time
either the element's end tag is parsed or the parser detects a
@@ -96933,17 +96929,14 @@
an interoperable fashion without requiring any network access for
handling external subsets. <a href=#refsXML>[XML]</a></p>
- <p id=scriptTagXML>When an <a href=#xml-parser>XML parser</a> creates a
- <code><a href=#the-script-element>script</a></code> element, it must be marked as being
- <a href=#parser-inserted>"parser-inserted"</a> and its <a href=#force-async>"force-async"</a>
- flag must be unset. If the parser was originally created for the
- <a href=#xml-fragment-parsing-algorithm>XML fragment parsing algorithm</a>, then the element must
- be marked as <a href=#already-started>"already started"</a> also. When the element's
- end tag is parsed, the user agent must <a href=#provide-a-stable-state>provide a stable
- state</a>, and then <a href=#prepare-a-script title="prepare a script">prepare</a>
- the <code><a href=#the-script-element>script</a></code> element. If this causes there to be a
- <a href=#pending-parsing-blocking-script>pending parsing-blocking script</a>, then the user agent
- must run the following steps:</p>
+ <p id=scriptTagXML>When an <a href=#xml-parser>XML parser</a> creates a <code><a href=#the-script-element>script</a></code> element, it
+ must be marked as being <a href=#parser-inserted>"parser-inserted"</a> and its <a href=#force-async>"force-async"</a> flag
+ must be unset. If the parser was originally created for the <a href=#xml-fragment-parsing-algorithm>XML fragment parsing
+ algorithm</a>, then the element must be marked as <a href=#already-started>"already started"</a> also. When the
+ element's end tag is parsed, the user agent must <a href=#perform-a-microtask-checkpoint>perform a microtask checkpoint</a>,
+ <a href=#provide-a-stable-state>provide a stable state</a>, and then <a href=#prepare-a-script title="prepare a script">prepare</a> the
+ <code><a href=#the-script-element>script</a></code> element. If this causes there to be a <a href=#pending-parsing-blocking-script>pending parsing-blocking
+ script</a>, then the user agent must run the following steps:</p>
<ol><li><p>Block this instance of the <a href=#xml-parser>XML parser</a>, such
that the <a href=#event-loop>event loop</a> will not run <a href=#concept-task title=concept-task>tasks</a> that invoke it.</li>
@@ -103234,8 +103227,8 @@
<code title=attr-tdth-colspan><a href=#attr-tdth-colspan>colspan</a></code>;
<code title=attr-tdth-rowspan><a href=#attr-tdth-rowspan>rowspan</a></code>;
<code title=attr-tdth-headers><a href=#attr-tdth-headers>headers</a></code>;
- <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code></td>;
- <code title=attr-th-abbr><a href=#attr-th-abbr>abbr</a></code>
+ <code title=attr-th-scope><a href=#attr-th-scope>scope</a></code>;
+ <code title=attr-th-abbr><a href=#attr-th-abbr>abbr</a></code></td>
<td><code><a href=#htmltableheadercellelement>HTMLTableHeaderCellElement</a></code></td>
<tr><th><code><a href=#the-thead-element>thead</a></code></th>
<td>Group of heading rows in a table</td>
Modified: source
===================================================================
--- source 2012-10-23 22:07:11 UTC (rev 7483)
+++ source 2012-10-23 22:24:19 UTC (rev 7484)
@@ -107023,14 +107023,14 @@
</div>
- <p id="mutation-during-parsing">DOM mutation events and mutation
- observers must not fire for changes caused by the UA parsing the
- document. (Conceptually, the parser is not mutating the DOM, it is
- constructing it.) This includes the parsing of any content inserted
- using <code title="dom-document-write">document.write()</code> and
- <code title="dom-document-writeln">document.writeln()</code> calls.
- <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
+ <p id="mutation-during-parsing">DOM mutation events must not fire for changes caused by the UA
+ parsing the document. This includes the parsing of any content inserted using <code
+ title="dom-document-write">document.write()</code> and <code
+ title="dom-document-writeln">document.writeln()</code> calls. <a
+ href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
+ <p>However, mutation observers <em>do</em> fire, as required by the DOM Core specification.</p>
+
<p class="note">Not all of the tag names mentioned below are
conformant tag names in this specification; many are included to
handle legacy content. They still form part of the algorithm that
@@ -109450,6 +109450,8 @@
<dt id="scriptEndTag">An end tag whose tag name is "script"</dt>
<dd>
+ <p><span>Perform a microtask checkpoint</span>.</p>
+
<p><span>Provide a stable state</span>.</p>
<p>Let <var title="">script</var> be the <span>current node</span>
@@ -112295,18 +112297,16 @@
<code>Document</code> object when it is created, or creates one
implicitly.</p>
- <p>This <code>Document</code> must then be populated with DOM nodes
- that represent the tree structure of the input passed to the parser,
- as defined by the XML specification, the Namespaces in XML
- specification, and the DOM Core specification. DOM mutation events
- must not fire for the operations that the <span>XML parser</span>
- performs on the <code>Document</code>'s tree, but the user agent
- must act as if elements and attributes were individually appended
- and set respectively so as to trigger rules in this specification
- regarding what happens when an element is inserted into a document
- or has its attributes set. <a href="#refsXML">[XML]</a> <a
- href="#refsXMLNS">[XMLNS]</a> <a href="#refsDOMCORE">[DOMCORE]</a>
- <a href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
+ <p>This <code>Document</code> must then be populated with DOM nodes that represent the tree
+ structure of the input passed to the parser, as defined by the XML specification, the Namespaces
+ in XML specification, and the DOM Core specification. DOM mutation events must not fire for the
+ operations that the <span>XML parser</span> performs on the <code>Document</code>'s tree, but the
+ user agent must act as if elements and attributes were individually appended and set respectively
+ so as to trigger rules in this specification regarding what happens when an element is inserted
+ into a document or has its attributes set, and the DOM Core specification's requirements regarding
+ mutation observers mean that mutation observers <em>are</em> fired (unlike mutation events). <a
+ href="#refsXML">[XML]</a> <a href="#refsXMLNS">[XMLNS]</a> <a href="#refsDOMCORE">[DOMCORE]</a> <a
+ href="#refsDOMEVENTS">[DOMEVENTS]</a></p>
<p>Between the time an element's start tag is parsed and the time
either the element's end tag is parsed or the parser detects a
@@ -112349,17 +112349,14 @@
an interoperable fashion without requiring any network access for
handling external subsets. <a href="#refsXML">[XML]</a></p>
- <p id="scriptTagXML">When an <span>XML parser</span> creates a
- <code>script</code> element, it must be marked as being
- <span>"parser-inserted"</span> and its <span>"force-async"</span>
- flag must be unset. If the parser was originally created for the
- <span>XML fragment parsing algorithm</span>, then the element must
- be marked as <span>"already started"</span> also. When the element's
- end tag is parsed, the user agent must <span>provide a stable
- state</span>, and then <span title="prepare a script">prepare</span>
- the <code>script</code> element. If this causes there to be a
- <span>pending parsing-blocking script</span>, then the user agent
- must run the following steps:</p>
+ <p id="scriptTagXML">When an <span>XML parser</span> creates a <code>script</code> element, it
+ must be marked as being <span>"parser-inserted"</span> and its <span>"force-async"</span> flag
+ must be unset. If the parser was originally created for the <span>XML fragment parsing
+ algorithm</span>, then the element must be marked as <span>"already started"</span> also. When the
+ element's end tag is parsed, the user agent must <span>perform a microtask checkpoint</span>,
+ <span>provide a stable state</span>, and then <span title="prepare a script">prepare</span> the
+ <code>script</code> element. If this causes there to be a <span>pending parsing-blocking
+ script</span>, then the user agent must run the following steps:</p>
<ol>
@@ -120871,7 +120868,7 @@
<code title="attr-tdth-colspan">colspan</code>;
<code title="attr-tdth-rowspan">rowspan</code>;
<code title="attr-tdth-headers">headers</code>;
- <code title="attr-th-scope">scope</code></td>;
+ <code title="attr-th-scope">scope</code>;
<code title="attr-th-abbr">abbr</code></td>
<td><code>HTMLTableHeaderCellElement</code></td>
</tr>
More information about the Commit-Watchers
mailing list