[html5] r3388 - [] (0) Clarify DOMTokenList's case-sensitivity.

whatwg at whatwg.org whatwg at whatwg.org
Sun Jul 12 20:15:18 PDT 2009


Author: ianh
Date: 2009-07-12 20:15:16 -0700 (Sun, 12 Jul 2009)
New Revision: 3388

Modified:
   index
   source
Log:
[] (0) Clarify DOMTokenList's case-sensitivity.

Modified: index
===================================================================
--- index	2009-07-12 06:58:09 UTC (rev 3387)
+++ index	2009-07-13 03:15:16 UTC (rev 3388)
@@ -67,7 +67,7 @@
   <div class=head>
    <p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
    <h1>HTML 5</h1>
-   <h2 class="no-num no-toc" id=draft-standard-—-date:-01-jan-1901>Draft Standard — 12 July 2009</h2>
+   <h2 class="no-num no-toc" id=draft-standard-—-date:-01-jan-1901>Draft Standard — 13 July 2009</h2>
    <p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
    <p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
    <!--<p class="impl"><strong>Implementors!</strong> We have a <a href="http://www.whatwg.org/mailing-list#implementors">mailing list</a> for you too!</p>-->
@@ -5775,6 +5775,10 @@
   preserves the underlying order for consistency between
   implementations.</p>
 
+  <p class=note><code><a href=#domtokenlist-0>DOMTokenList</a></code> objects are always
+  <a href=#case-sensitive>case-sensitive</a>, even when the underlying string might
+  ordinarily be treated in a case-insensitive manner.</p>
+
   <pre class=idl>[<a href=#dom-tokenlist-tostring title=dom-tokenlist-toString>Stringifies</a>] interface <dfn id=domtokenlist-0>DOMTokenList</dfn> {
   readonly attribute unsigned long <a href=#dom-tokenlist-length title=dom-tokenlist-length>length</a>;
   [IndexGetter] DOMString <a href=#dom-tokenlist-item title=dom-tokenlist-item>item</a>(in unsigned long index);
@@ -5792,7 +5796,7 @@
    <dt><var title="">element</var> = <var title="">tokenlist</var> . <code title=dom-tokenlist-item><a href=#dom-tokenlist-item>item</a></code>(<var title="">index</var>)</dt>
    <dt><var title="">tokenlist</var>[<var title="">index</var>]</dt>
    <dd>
-    <p>Returns the token with index <var title="">index</var>. The tokens are sorted alphabetically.</p>
+    <p>Returns the token with index <var title="">index</var>. The tokens are returned in the order they are found in the underlying string, with duplicates removed.</p>
     <p>Returns null if <var title="">index</var> is out of range.</p>
    </dd>
 
@@ -5853,9 +5857,10 @@
    underlying string on spaces</a> to get the list of tokens in the
    object's underlying string.</li>
 
-   <li>If the token indicated by <var title="">token</var> is one of
-   the tokens in the object's underlying string then return true and
-   stop this algorithm.</li>
+   <li>If the token indicated by <var title="">token</var> is a
+   <a href=#case-sensitive>case-sensitive</a> match for one of the tokens in the
+   object's underlying string then return true and stop this
+   algorithm.</li>
 
    <li>Otherwise, return false.</li>
 
@@ -5870,9 +5875,10 @@
    underlying string on spaces</a> to get the list of tokens in the
    object's underlying string.</li>
 
-   <li>If the given <var title="">token</var> is already one of the
-   tokens in the <code><a href=#domtokenlist-0>DOMTokenList</a></code> object's underlying string
-   then stop the algorithm.</li>
+   <li>If the given <var title="">token</var> is a
+   <a href=#case-sensitive>case-sensitive</a> match for one of the tokens in the
+   <code><a href=#domtokenlist-0>DOMTokenList</a></code> object's underlying string then stop the
+   algorithm.</li>
 
    <li>Otherwise, if the <code><a href=#domtokenlist-0>DOMTokenList</a></code> object's underlying
    string is not the empty string and the last character of that
@@ -5904,11 +5910,10 @@
    underlying string on spaces</a> to get the list of tokens in the
    object's underlying string.</li>
 
-   <li>If the given <var title="">token</var> is already one of the
-   tokens in the <code><a href=#domtokenlist-0>DOMTokenList</a></code> object's underlying string
-   then <a href=#remove-a-token-from-a-string title="remove a token from a string">remove the given
-   <var title="">token</var> from the underlying string</a>, and
-   stop the algorithm, returning false.</li>
+   <li>If the given <var title="">token</var> is a
+   <a href=#case-sensitive>case-sensitive</a> match for one of the tokens in the
+   <code><a href=#domtokenlist-0>DOMTokenList</a></code> object's underlying string then <a href=#remove-a-token-from-a-string title="remove a token from a string">remove the given <var title="">token</var> from the underlying string</a> and stop the
+   algorithm, returning false.</li>
 
    <li>Otherwise, if the <code><a href=#domtokenlist-0>DOMTokenList</a></code> object's underlying
    string is not the empty string and the last character of that

Modified: source
===================================================================
--- source	2009-07-12 06:58:09 UTC (rev 3387)
+++ source	2009-07-13 03:15:16 UTC (rev 3388)
@@ -5613,6 +5613,10 @@
   preserves the underlying order for consistency between
   implementations.</p>
 
+  <p class="note"><code>DOMTokenList</code> objects are always
+  <span>case-sensitive</span>, even when the underlying string might
+  ordinarily be treated in a case-insensitive manner.</p>
+
   <pre class="idl">[<span title="dom-tokenlist-toString">Stringifies</span>] interface <dfn>DOMTokenList</dfn> {
   readonly attribute unsigned long <span title="dom-tokenlist-length">length</span>;
   [IndexGetter] DOMString <span title="dom-tokenlist-item">item</span>(in unsigned long index);
@@ -5632,7 +5636,7 @@
    <dt><var title="">element</var> = <var title="">tokenlist</var> . <code title="dom-tokenlist-item">item</code>(<var title="">index</var>)</dt>
    <dt><var title="">tokenlist</var>[<var title="">index</var>]</dt>
    <dd>
-    <p>Returns the token with index <var title="">index</var>. The tokens are sorted alphabetically.</p>
+    <p>Returns the token with index <var title="">index</var>. The tokens are returned in the order they are found in the underlying string, with duplicates removed.</p>
     <p>Returns null if <var title="">index</var> is out of range.</p>
    </dd>
 
@@ -5707,9 +5711,10 @@
    underlying string on spaces</span> to get the list of tokens in the
    object's underlying string.</li>
 
-   <li>If the token indicated by <var title="">token</var> is one of
-   the tokens in the object's underlying string then return true and
-   stop this algorithm.</li>
+   <li>If the token indicated by <var title="">token</var> is a
+   <span>case-sensitive</span> match for one of the tokens in the
+   object's underlying string then return true and stop this
+   algorithm.</li>
 
    <li>Otherwise, return false.</li>
 
@@ -5730,9 +5735,10 @@
    underlying string on spaces</span> to get the list of tokens in the
    object's underlying string.</li>
 
-   <li>If the given <var title="">token</var> is already one of the
-   tokens in the <code>DOMTokenList</code> object's underlying string
-   then stop the algorithm.</li>
+   <li>If the given <var title="">token</var> is a
+   <span>case-sensitive</span> match for one of the tokens in the
+   <code>DOMTokenList</code> object's underlying string then stop the
+   algorithm.</li>
 
    <li>Otherwise, if the <code>DOMTokenList</code> object's underlying
    string is not the empty string and the last character of that
@@ -5776,11 +5782,12 @@
    underlying string on spaces</span> to get the list of tokens in the
    object's underlying string.</li>
 
-   <li>If the given <var title="">token</var> is already one of the
-   tokens in the <code>DOMTokenList</code> object's underlying string
-   then <span title="remove a token from a string">remove the given
-   <var title="">token</var> from the underlying string</span>, and
-   stop the algorithm, returning false.</li>
+   <li>If the given <var title="">token</var> is a
+   <span>case-sensitive</span> match for one of the tokens in the
+   <code>DOMTokenList</code> object's underlying string then <span
+   title="remove a token from a string">remove the given <var
+   title="">token</var> from the underlying string</span> and stop the
+   algorithm, returning false.</li>
 
    <li>Otherwise, if the <code>DOMTokenList</code> object's underlying
    string is not the empty string and the last character of that




More information about the Commit-Watchers mailing list