Skip to content

Commit

Permalink
[giow] (3) option.text needs to exclude script nodes, for compat reasons
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=19549
Affected topics: DOM APIs

git-svn-id: http://svn.whatwg.org/webapps@7652 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 26, 2013
1 parent e0f549a commit b1adc35
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 deletions.
20 changes: 13 additions & 7 deletions complete.html
Expand Up @@ -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 &mdash; Last Updated 25 January 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; 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>
Expand Down Expand Up @@ -52774,7 +52774,7 @@ <h4 id=the-option-element><span class=secno>4.10.12 </span>The <dfn><code>option

<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>

Expand Down Expand Up @@ -52814,11 +52814,17 @@ <h4 id=the-option-element><span class=secno>4.10.12 </span>The <dfn><code>option
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
Expand Down
20 changes: 13 additions & 7 deletions index
Expand Up @@ -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 &mdash; Last Updated 25 January 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; 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>
Expand Down Expand Up @@ -52774,7 +52774,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme

<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>

Expand Down Expand Up @@ -52814,11 +52814,17 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href=#htmleleme
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
Expand Down
18 changes: 12 additions & 6 deletions source
Expand Up @@ -61580,7 +61580,7 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {

<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>

Expand Down Expand Up @@ -61624,11 +61624,17 @@ interface <dfn>HTMLOptionElement</dfn> : <span>HTMLElement</span> {
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
Expand Down

0 comments on commit b1adc35

Please sign in to comment.