Fix Element.id and Element.className to not return null. Ack David Flanagan.
authorMs2ger <ms2ger@gmail.com>
Thu, 25 Aug 2011 21:33:17 +0200
changeset 7265a5df3db5333
parent 725 b4836e8020e9
child 727 0a951707ad4a
Fix Element.id and Element.className to not return null. Ack David Flanagan.
http://lists.w3.org/Archives/Public/www-dom/2011JulSep/0137.html
Overview.html
Overview.src.html
dom-core.html
     1.1 --- a/Overview.html	Tue Aug 23 13:28:47 2011 +0200
     1.2 +++ b/Overview.html	Thu Aug 25 21:33:17 2011 +0200
     1.3 @@ -51,8 +51,8 @@
     1.4  <!--end-logo-->
     1.5  </div>
     1.6   <h1>DOM Core</h1>
     1.7 - <h2 class="no-num no-toc" id="editor-s-draft-23-august-2011">
     1.8 -  <span class="w3conly">Editor's Draft 23 August 2011</span>
     1.9 + <h2 class="no-num no-toc" id="editor-s-draft-25-august-2011">
    1.10 +  <span class="w3conly">Editor's Draft 25 August 2011</span>
    1.11    </h2>
    1.12  
    1.13   <dl>
    1.14 @@ -95,7 +95,7 @@
    1.15  the <a href="http://www.w3.org/TR/">W3C technical reports index</a> at
    1.16  http://www.w3.org/TR/.</i>
    1.17  
    1.18 -<p>This is the 23 August 2011 Editor's Draft of DOM Core. Please send
    1.19 +<p>This is the 25 August 2011 Editor's Draft of DOM Core. Please send
    1.20  comments to
    1.21  <a href="mailto:www-dom@w3.org?subject=%5BDOMCore%5D%20">www-dom@w3.org</a>
    1.22  (<a href="http://lists.w3.org/Archives/Public/www-dom/">archived</a>)
    1.23 @@ -3587,23 +3587,32 @@
    1.24   need more text for DOMTokenList explaining various reflecting conditions.
    1.25  -->
    1.26  
    1.27 -<p>The <dfn id="dom-element-id" title="dom-Element-id"><code>id</code></dfn> attribute must return
    1.28 -the result of invoking
    1.29 -<code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">getAttribute()</a></code> with
    1.30 -"<code title="">id</code>" as argument.
    1.31 -
    1.32 -<p>Setting the <code title="dom-Element-id"><a href="#dom-element-id">id</a></code> attribute must invoke
    1.33 -<code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">setAttribute()</a></code> with
    1.34 -"<code title="">id</code>" and new value as arguments.
    1.35 +<p>Some IDL attributes are defined to
    1.36 +<dfn id="concept-reflect" title="concept-reflect">reflect</dfn> a particular content attribute.
    1.37 +This means that on getting, the following steps must be run:
    1.38 +
    1.39 +<ol>
    1.40 +  <li>Let <var title="">attribute</var> be the result of invoking
    1.41 +  <code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">getAttribute()</a></code> with the name
    1.42 +  of the content attribute as its argument.
    1.43 +
    1.44 +  <li>If <var title="">attribute</var> is null, return the empty string and
    1.45 +  terminate these steps.
    1.46 +
    1.47 +  <li>Return <var title="">attribute</var>.
    1.48 +</ol>
    1.49 +
    1.50 +On setting, the user agent must invoke
    1.51 +<code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">setAttribute()</a></code> with the name of
    1.52 +the content attribute and the new value as its arguments.
    1.53 +
    1.54 +<p>The <dfn id="dom-element-id" title="dom-Element-id"><code>id</code></dfn> attribute must
    1.55 +<a href="#concept-reflect" title="concept-reflect">reflect</a> the "<code title="">id</code>"
    1.56 +content attribute.
    1.57  
    1.58  <p>The <dfn id="dom-element-classname" title="dom-Element-className"><code>className</code></dfn>
    1.59 -attribute must return the result of invoking
    1.60 -<code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">getAttribute()</a></code> with
    1.61 -"<code title="">class</code>" as argument.
    1.62 -
    1.63 -<p>Setting the <code title="dom-Element-className"><a href="#dom-element-classname">className</a></code> attribute
    1.64 -must invoke <code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">setAttribute()</a></code> with
    1.65 -"<code title="">class</code>" and new value as arguments.
    1.66 +attribute must <a href="#concept-reflect" title="concept-reflect">reflect</a> the
    1.67 +"<code title="">class</code>" content attribute.
    1.68  
    1.69  <p>The <dfn id="dom-element-classlist" title="dom-Element-classList"><code>classList</code></dfn>
    1.70  attribute must return a <code><a href="#domtokenlist">DOMTokenList</a></code> whose
     2.1 --- a/Overview.src.html	Tue Aug 23 13:28:47 2011 +0200
     2.2 +++ b/Overview.src.html	Thu Aug 25 21:33:17 2011 +0200
     2.3 @@ -3568,23 +3568,32 @@
     2.4   need more text for DOMTokenList explaining various reflecting conditions.
     2.5  -->
     2.6  
     2.7 -<p>The <dfn title=dom-Element-id><code>id</code></dfn> attribute must return
     2.8 -the result of invoking
     2.9 -<code title=dom-Element-getAttribute>getAttribute()</code> with
    2.10 -"<code title>id</code>" as argument.
    2.11 -
    2.12 -<p>Setting the <code title=dom-Element-id>id</code> attribute must invoke
    2.13 -<code title=dom-Element-getAttribute>setAttribute()</code> with
    2.14 -"<code title>id</code>" and new value as arguments.
    2.15 +<p>Some IDL attributes are defined to
    2.16 +<dfn title=concept-reflect>reflect</dfn> a particular content attribute.
    2.17 +This means that on getting, the following steps must be run:
    2.18 +
    2.19 +<ol>
    2.20 +  <li>Let <var title>attribute</var> be the result of invoking
    2.21 +  <code title=dom-Element-getAttribute>getAttribute()</code> with the name
    2.22 +  of the content attribute as its argument.
    2.23 +
    2.24 +  <li>If <var title>attribute</var> is null, return the empty string and
    2.25 +  terminate these steps.
    2.26 +
    2.27 +  <li>Return <var title>attribute</var>.
    2.28 +</ol>
    2.29 +
    2.30 +On setting, the user agent must invoke
    2.31 +<code title=dom-Element-getAttribute>setAttribute()</code> with the name of
    2.32 +the content attribute and the new value as its arguments.
    2.33 +
    2.34 +<p>The <dfn title=dom-Element-id><code>id</code></dfn> attribute must
    2.35 +<span title=concept-reflect>reflect</span> the "<code title>id</code>"
    2.36 +content attribute.
    2.37  
    2.38  <p>The <dfn title=dom-Element-className><code>className</code></dfn>
    2.39 -attribute must return the result of invoking
    2.40 -<code title=dom-Element-getAttribute>getAttribute()</code> with
    2.41 -"<code title>class</code>" as argument.
    2.42 -
    2.43 -<p>Setting the <code title=dom-Element-className>className</code> attribute
    2.44 -must invoke <code title=dom-Element-getAttribute>setAttribute()</code> with
    2.45 -"<code title>class</code>" and new value as arguments.
    2.46 +attribute must <span title=concept-reflect>reflect</span> the
    2.47 +"<code title>class</code>" content attribute.
    2.48  
    2.49  <p>The <dfn title=dom-Element-classList><code>classList</code></dfn>
    2.50  attribute must return a <code>DOMTokenList</code> whose
     3.1 --- a/dom-core.html	Tue Aug 23 13:28:47 2011 +0200
     3.2 +++ b/dom-core.html	Thu Aug 25 21:33:17 2011 +0200
     3.3 @@ -12,8 +12,8 @@
     3.4  
     3.5  <div class="head">
     3.6  <h1>DOM Core</h1>
     3.7 - <h2 class="no-num no-toc" id="free-editor-s-draft-23-august-2011">
     3.8 -  <span class="now3c">Free Editor's Draft 23 August 2011</span>
     3.9 + <h2 class="no-num no-toc" id="free-editor-s-draft-25-august-2011">
    3.10 +  <span class="now3c">Free Editor's Draft 25 August 2011</span>
    3.11   </h2>
    3.12  
    3.13   <dl>
    3.14 @@ -3512,23 +3512,32 @@
    3.15   need more text for DOMTokenList explaining various reflecting conditions.
    3.16  -->
    3.17  
    3.18 -<p>The <dfn id="dom-element-id" title="dom-Element-id"><code>id</code></dfn> attribute must return
    3.19 -the result of invoking
    3.20 -<code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">getAttribute()</a></code> with
    3.21 -"<code title="">id</code>" as argument.
    3.22 -
    3.23 -<p>Setting the <code title="dom-Element-id"><a href="#dom-element-id">id</a></code> attribute must invoke
    3.24 -<code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">setAttribute()</a></code> with
    3.25 -"<code title="">id</code>" and new value as arguments.
    3.26 +<p>Some IDL attributes are defined to
    3.27 +<dfn id="concept-reflect" title="concept-reflect">reflect</dfn> a particular content attribute.
    3.28 +This means that on getting, the following steps must be run:
    3.29 +
    3.30 +<ol>
    3.31 +  <li>Let <var title="">attribute</var> be the result of invoking
    3.32 +  <code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">getAttribute()</a></code> with the name
    3.33 +  of the content attribute as its argument.
    3.34 +
    3.35 +  <li>If <var title="">attribute</var> is null, return the empty string and
    3.36 +  terminate these steps.
    3.37 +
    3.38 +  <li>Return <var title="">attribute</var>.
    3.39 +</ol>
    3.40 +
    3.41 +On setting, the user agent must invoke
    3.42 +<code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">setAttribute()</a></code> with the name of
    3.43 +the content attribute and the new value as its arguments.
    3.44 +
    3.45 +<p>The <dfn id="dom-element-id" title="dom-Element-id"><code>id</code></dfn> attribute must
    3.46 +<a href="#concept-reflect" title="concept-reflect">reflect</a> the "<code title="">id</code>"
    3.47 +content attribute.
    3.48  
    3.49  <p>The <dfn id="dom-element-classname" title="dom-Element-className"><code>className</code></dfn>
    3.50 -attribute must return the result of invoking
    3.51 -<code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">getAttribute()</a></code> with
    3.52 -"<code title="">class</code>" as argument.
    3.53 -
    3.54 -<p>Setting the <code title="dom-Element-className"><a href="#dom-element-classname">className</a></code> attribute
    3.55 -must invoke <code title="dom-Element-getAttribute"><a href="#dom-element-getattribute">setAttribute()</a></code> with
    3.56 -"<code title="">class</code>" and new value as arguments.
    3.57 +attribute must <a href="#concept-reflect" title="concept-reflect">reflect</a> the
    3.58 +"<code title="">class</code>" content attribute.
    3.59  
    3.60  <p>The <dfn id="dom-element-classlist" title="dom-Element-classList"><code>classList</code></dfn>
    3.61  attribute must return a <code><a href="#domtokenlist">DOMTokenList</a></code> whose