[html5] r3479 - [] (0) Make DOMTokenList not remove duplicates.

whatwg at whatwg.org whatwg at whatwg.org
Mon Jul 27 17:57:12 PDT 2009


Author: ianh
Date: 2009-07-27 17:57:11 -0700 (Mon, 27 Jul 2009)
New Revision: 3479

Modified:
   index
   source
Log:
[] (0) Make DOMTokenList not remove duplicates.


Modified: index
===================================================================
--- index	2009-07-28 00:04:06 UTC (rev 3478)
+++ index	2009-07-28 00:57:11 UTC (rev 3479)
@@ -5968,14 +5968,9 @@
   <h4 id=domtokenlist><span class=secno>2.8.3 </span>DOMTokenList</h4>
 
   <p>The <code><a href=#domtokenlist-0>DOMTokenList</a></code> interface represents an interface
-  to an underlying string that consists of an <a href=#unordered-set-of-unique-space-separated-tokens>unordered set of
-  unique space-separated tokens</a>.</p>
+  to an underlying string that consists of a <a href=#set-of-space-separated-tokens>set of
+  space-separated tokens</a>.</p>
 
-  <p class=note>While the order of the tokens in the underlying
-  string is not important, the <code><a href=#domtokenlist-0>DOMTokenList</a></code> interfaces
-  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>
@@ -5997,7 +5992,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 returned in the order they are found in the underlying string, with duplicates removed.</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.</p>
     <p>Returns null if <var title="">index</var> is out of range.</p>
    </dd>
 
@@ -6032,9 +6027,8 @@
   </dl><div class=impl>
 
   <p>The <dfn id=dom-tokenlist-length title=dom-tokenlist-length><code>length</code></dfn>
-  attribute must return the number of <em>unique</em> tokens that
-  result from <a href=#split-a-string-on-spaces title="split a string on spaces">splitting the
-  underlying string on spaces</a>. This is the <var title=dom-tokenlist-length><a href=#dom-tokenlist-length>length</a></var>.</p>
+  attribute must return the number of tokens that result from <a href=#split-a-string-on-spaces title="split a string on spaces">splitting the underlying string on
+  spaces</a>. This is the <var title=dom-tokenlist-length><a href=#dom-tokenlist-length>length</a></var>.</p>
 
   <p>The object's <span>indices of the supported indexed
   properties</span> are the numbers in the range zero to <span title=""><var title=dom-tokenlist-length><a href=#dom-tokenlist-length>length</a></var>-1</span>, unless the <var title=dom-tokenlist-length><a href=#dom-tokenlist-length>length</a></var> is zero, in which case
@@ -6043,13 +6037,13 @@
   <p>The <dfn id=dom-tokenlist-item title=dom-tokenlist-item><code>item(<var title="">index</var>)</code></dfn> method must <a href=#split-a-string-on-spaces title="split a
   string on spaces">split the underlying string on spaces</a>,
   preserving the order of the tokens as found in the underlying
-  string, remove instances of exact duplicates other than the first
-  instance in each case, and then return the <var title="">index</var>th item in this list. If <var title="">index</var> is equal to or greater than the number of
-  tokens, then the method must return null.</p>
+  string, and then return the <var title="">index</var>th item in this
+  list. If <var title="">index</var> is equal to or greater than the
+  number of tokens, then the method must return null.</p>
 
   <p class=example>For example, if the string is "<code title="">a b
-  a c</code>" then there are three tokens: the token with index 0 is
-  "<code title="">a</code>", the token with index 1 is "<code title="">b</code>", and the token with index 2 is "<code title="">c</code>".</p>
+  a c</code>" then there are four tokens: the token with index 0 is
+  "<code title="">a</code>", the token with index 1 is "<code title="">b</code>", the token with index 2 is "<code title="">a</code>", and the token with index 3 is "<code title="">c</code>".</p>
 
   <p>The <dfn id=dom-tokenlist-contains title=dom-tokenlist-contains><code>contains(<var title="">token</var>)</code></dfn> method must run the following
   algorithm:</p>

Modified: source
===================================================================
--- source	2009-07-28 00:04:06 UTC (rev 3478)
+++ source	2009-07-28 00:57:11 UTC (rev 3479)
@@ -5838,14 +5838,9 @@
   <h4>DOMTokenList</h4>
 
   <p>The <code>DOMTokenList</code> interface represents an interface
-  to an underlying string that consists of an <span>unordered set of
-  unique space-separated tokens</span>.</p>
+  to an underlying string that consists of a <span>set of
+  space-separated tokens</span>.</p>
 
-  <p class="note">While the order of the tokens in the underlying
-  string is not important, the <code>DOMTokenList</code> interfaces
-  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>
@@ -5869,7 +5864,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 returned in the order they are found in the underlying string, with duplicates removed.</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.</p>
     <p>Returns null if <var title="">index</var> is out of range.</p>
    </dd>
 
@@ -5906,9 +5901,9 @@
   <div class="impl">
 
   <p>The <dfn title="dom-tokenlist-length"><code>length</code></dfn>
-  attribute must return the number of <em>unique</em> tokens that
-  result from <span title="split a string on spaces">splitting the
-  underlying string on spaces</span>. This is the <var
+  attribute must return the number of tokens that result from <span
+  title="split a string on spaces">splitting the underlying string on
+  spaces</span>. This is the <var
   title="dom-tokenlist-length">length</var>.</p>
 
   <p>The object's <span>indices of the supported indexed
@@ -5921,16 +5916,15 @@
   title="">index</var>)</code></dfn> method must <span title="split a
   string on spaces">split the underlying string on spaces</span>,
   preserving the order of the tokens as found in the underlying
-  string, remove instances of exact duplicates other than the first
-  instance in each case, and then return the <var
-  title="">index</var>th item in this list. If <var
-  title="">index</var> is equal to or greater than the number of
-  tokens, then the method must return null.</p>
+  string, and then return the <var title="">index</var>th item in this
+  list. If <var title="">index</var> is equal to or greater than the
+  number of tokens, then the method must return null.</p>
 
   <p class="example">For example, if the string is "<code title="">a b
-  a c</code>" then there are three tokens: the token with index 0 is
+  a c</code>" then there are four tokens: the token with index 0 is
   "<code title="">a</code>", the token with index 1 is "<code
-  title="">b</code>", and the token with index 2 is "<code
+  title="">b</code>", the token with index 2 is "<code
+  title="">a</code>", and the token with index 3 is "<code
   title="">c</code>".</p>
 
   <p>The <dfn title="dom-tokenlist-contains"><code>contains(<var




More information about the Commit-Watchers mailing list