[html5] r7652 - [giow] (3) option.text needs to exclude script nodes, for compat reasons Fixing [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Jan 25 16:58:11 PST 2013


Author: ianh
Date: 2013-01-25 16:58:10 -0800 (Fri, 25 Jan 2013)
New Revision: 7652

Modified:
   complete.html
   index
   source
Log:
[giow] (3) option.text needs to exclude script nodes, for compat reasons
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=19549
Affected topics: DOM APIs

Modified: complete.html
===================================================================
--- complete.html	2013-01-25 23:56:27 UTC (rev 7651)
+++ complete.html	2013-01-26 00:58:10 UTC (rev 7652)
@@ -248,7 +248,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 25 January 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 26 January 2013</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -52774,7 +52774,7 @@
 
    <dd>
 
-    <p>Same as <code><a href=#textcontent>textContent</a></code>, except that spaces are collapsed.</p>
+    <p>Same as <code><a href=#textcontent>textContent</a></code>, except that spaces are collapsed and <code><a href=#the-script-element>script</a></code> elements are skipped.</p>
 
    </dd>
 
@@ -52814,12 +52814,18 @@
   element's <a href=#concept-option-index title=concept-option-index>index</a>.</p>
 
   <p>The <dfn id=dom-option-text title=dom-option-text><code>text</code></dfn> IDL attribute, on getting, must return
-  the value of the <code><a href=#textcontent>textContent</a></code> IDL attribute on the element, with <a href=#strip-leading-and-trailing-whitespace title="strip
-  leading and trailing whitespace">leading and trailing whitespace stripped</a>, and with any
-  sequences of two or more <a href=#space-character title="space character">space characters</a> replaced by a
-  single U+0020 SPACE character. On setting, it must act as if the <code><a href=#textcontent>textContent</a></code> IDL
-  attribute on the element had been set to the new value.</p>
+  the concatenation of <span title=concept-cd-data>data</span> of all the <code><a href=#text>Text</a></code> node
+  descendants of the <code><a href=#the-option-element>option</a></code> element, in <a href=#tree-order>tree order</a>, excluding any that are
+  descendants of descendants of the <code><a href=#the-option-element>option</a></code> element that are themselves
+  <code><a href=#the-script-element>script</a></code> elements in the <a href=#html-namespace-0>HTML namespace</a> or <code title="">script</code>
+  elements in the <a href=#svg-namespace>SVG namespace</a>, with <a href=#strip-leading-and-trailing-whitespace title="strip leading and trailing
+  whitespace">leading and trailing whitespace stripped</a>, and with any sequences of two or more
+  <a href=#space-character title="space character">space characters</a> replaced by a single U+0020 SPACE
+  character.</p>
 
+  <p>On setting, the <code title=dom-option-text><a href=#dom-option-text>text</a></code> attribute must act as if the
+  <code><a href=#textcontent>textContent</a></code> IDL attribute on the element had been set to the new value.</p>
+
   <p>The <dfn id=dom-option-form title=dom-option-form><code>form</code></dfn> IDL attribute's behavior depends on
   whether the <code><a href=#the-option-element>option</a></code> element is in a <code><a href=#the-select-element>select</a></code> element or not. If the
   <code><a href=#the-option-element>option</a></code> has a <code><a href=#the-select-element>select</a></code> element as its parent, or has an

Modified: index
===================================================================
--- index	2013-01-25 23:56:27 UTC (rev 7651)
+++ index	2013-01-26 00:58:10 UTC (rev 7652)
@@ -248,7 +248,7 @@
 
   <header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
    <hgroup><h1 class=allcaps>HTML</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 25 January 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 26 January 2013</h2>
    </hgroup><dl><dt><strong>Web developer edition:</strong></dt>
     <dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
     <dt>Multiple-page version:</dt>
@@ -52774,7 +52774,7 @@
 
    <dd>
 
-    <p>Same as <code><a href=#textcontent>textContent</a></code>, except that spaces are collapsed.</p>
+    <p>Same as <code><a href=#textcontent>textContent</a></code>, except that spaces are collapsed and <code><a href=#the-script-element>script</a></code> elements are skipped.</p>
 
    </dd>
 
@@ -52814,12 +52814,18 @@
   element's <a href=#concept-option-index title=concept-option-index>index</a>.</p>
 
   <p>The <dfn id=dom-option-text title=dom-option-text><code>text</code></dfn> IDL attribute, on getting, must return
-  the value of the <code><a href=#textcontent>textContent</a></code> IDL attribute on the element, with <a href=#strip-leading-and-trailing-whitespace title="strip
-  leading and trailing whitespace">leading and trailing whitespace stripped</a>, and with any
-  sequences of two or more <a href=#space-character title="space character">space characters</a> replaced by a
-  single U+0020 SPACE character. On setting, it must act as if the <code><a href=#textcontent>textContent</a></code> IDL
-  attribute on the element had been set to the new value.</p>
+  the concatenation of <span title=concept-cd-data>data</span> of all the <code><a href=#text>Text</a></code> node
+  descendants of the <code><a href=#the-option-element>option</a></code> element, in <a href=#tree-order>tree order</a>, excluding any that are
+  descendants of descendants of the <code><a href=#the-option-element>option</a></code> element that are themselves
+  <code><a href=#the-script-element>script</a></code> elements in the <a href=#html-namespace-0>HTML namespace</a> or <code title="">script</code>
+  elements in the <a href=#svg-namespace>SVG namespace</a>, with <a href=#strip-leading-and-trailing-whitespace title="strip leading and trailing
+  whitespace">leading and trailing whitespace stripped</a>, and with any sequences of two or more
+  <a href=#space-character title="space character">space characters</a> replaced by a single U+0020 SPACE
+  character.</p>
 
+  <p>On setting, the <code title=dom-option-text><a href=#dom-option-text>text</a></code> attribute must act as if the
+  <code><a href=#textcontent>textContent</a></code> IDL attribute on the element had been set to the new value.</p>
+
   <p>The <dfn id=dom-option-form title=dom-option-form><code>form</code></dfn> IDL attribute's behavior depends on
   whether the <code><a href=#the-option-element>option</a></code> element is in a <code><a href=#the-select-element>select</a></code> element or not. If the
   <code><a href=#the-option-element>option</a></code> has a <code><a href=#the-select-element>select</a></code> element as its parent, or has an

Modified: source
===================================================================
--- source	2013-01-25 23:56:27 UTC (rev 7651)
+++ source	2013-01-26 00:58:10 UTC (rev 7652)
@@ -61580,7 +61580,7 @@
 
    <dd>
 
-    <p>Same as <code>textContent</code>, except that spaces are collapsed.</p>
+    <p>Same as <code>textContent</code>, except that spaces are collapsed and <code>script</code> elements are skipped.</p>
 
    </dd>
 
@@ -61624,12 +61624,18 @@
   element's <span title="concept-option-index">index</span>.</p>
 
   <p>The <dfn title="dom-option-text"><code>text</code></dfn> IDL attribute, on getting, must return
-  the value of the <code>textContent</code> IDL attribute on the element, with <span title="strip
-  leading and trailing whitespace">leading and trailing whitespace stripped</span>, and with any
-  sequences of two or more <span title="space character">space characters</span> replaced by a
-  single U+0020 SPACE character. On setting, it must act as if the <code>textContent</code> IDL
-  attribute on the element had been set to the new value.</p>
+  the concatenation of <span title="concept-cd-data">data</span> of all the <code>Text</code> node
+  descendants of the <code>option</code> element, in <span>tree order</span>, excluding any that are
+  descendants of descendants of the <code>option</code> element that are themselves
+  <code>script</code> elements in the <span>HTML namespace</span> or <code title="">script</code>
+  elements in the <span>SVG namespace</span>, with <span title="strip leading and trailing
+  whitespace">leading and trailing whitespace stripped</span>, and with any sequences of two or more
+  <span title="space character">space characters</span> replaced by a single U+0020 SPACE
+  character.</p>
 
+  <p>On setting, the <code title="dom-option-text">text</code> attribute must act as if the
+  <code>textContent</code> IDL attribute on the element had been set to the new value.</p>
+
   <p>The <dfn title="dom-option-form"><code>form</code></dfn> IDL attribute's behavior depends on
   whether the <code>option</code> element is in a <code>select</code> element or not. If the
   <code>option</code> has a <code>select</code> element as its parent, or has an




More information about the Commit-Watchers mailing list