[html5] r3452 - [] (0) Define DOMTokenList's behaviour with empty string arguments.

whatwg at whatwg.org whatwg at whatwg.org
Mon Jul 20 01:50:49 PDT 2009


Author: ianh
Date: 2009-07-20 01:50:47 -0700 (Mon, 20 Jul 2009)
New Revision: 3452

Modified:
   index
   source
Log:
[] (0) Define DOMTokenList's behaviour with empty string arguments.

Modified: index
===================================================================
--- index	2009-07-19 20:44:40 UTC (rev 3451)
+++ index	2009-07-20 08:50:47 UTC (rev 3452)
@@ -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 — 19 July 2009</h2>
+   <h2 class="no-num no-toc" id=draft-standard-—-date:-01-jan-1901>Draft Standard — 20 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>-->
@@ -6001,24 +6001,28 @@
    <dt><var title="">hastoken</var> = <var title="">tokenlist</var> . <code title=dom-tokenlist-contains><a href=#dom-tokenlist-contains>contains</a></code>(<var title="">token</var>)</dt>
    <dd>
     <p>Returns true if the <var title="">token</var> is present; false otherwise.</p>
+    <p>Throws a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception if <var title="">token</var> is empty.</p>
     <p>Throws an <code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception if <var title="">token</var> contains any spaces.</p>
    </dd>
 
    <dt><var title="">tokenlist</var> . <code title=dom-tokenlist-add><a href=#dom-tokenlist-add>add</a></code>(<var title="">token</var>)</dt>
    <dd>
     <p>Adds <var title="">token</var>, unless it is already present.</p>
+    <p>Throws a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception if <var title="">token</var> is empty.</p>
     <p>Throws an <code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception if <var title="">token</var> contains any spaces.</p>
    </dd>
 
    <dt><var title="">tokenlist</var> . <code title=dom-tokenlist-remove><a href=#dom-tokenlist-remove>remove</a></code>(<var title="">token</var>)</dt>
    <dd>
     <p>Removes <var title="">token</var> if it is present.</p>
+    <p>Throws a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception if <var title="">token</var> is empty.</p>
     <p>Throws an <code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception if <var title="">token</var> contains any spaces.</p>
    </dd>
 
    <dt><var title="">hastoken</var> = <var title="">tokenlist</var> . <code title=dom-tokenlist-toggle><a href=#dom-tokenlist-toggle>toggle</a></code>(<var title="">token</var>)</dt>
    <dd>
     <p>Adds <var title="">token</var> if it is not present, or removes it if it is.</p>
+    <p>Throws a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception if <var title="">token</var> is empty.</p>
     <p>Throws an <code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception if <var title="">token</var> contains any spaces.</p>
    </dd>
 
@@ -6047,7 +6051,11 @@
   <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>
 
-  <ol><li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
+  <ol><li>If the <var title="">token</var> argument is the empty string,
+   then raise a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception and stop the
+   algorithm.</li>
+
+   <li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
    <code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception and stop the
    algorithm.</li>
 
@@ -6065,7 +6073,11 @@
   </ol><p>The <dfn id=dom-tokenlist-add title=dom-tokenlist-add><code>add(<var title="">token</var>)</code></dfn> method must run the following
   algorithm:</p>
 
-  <ol><li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
+  <ol><li>If the <var title="">token</var> argument is the empty string,
+   then raise a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception and stop the
+   algorithm.</li>
+
+   <li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
    <code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception and stop the
    algorithm.</li>
 
@@ -6089,7 +6101,11 @@
   </ol><p>The <dfn id=dom-tokenlist-remove title=dom-tokenlist-remove><code>remove(<var title="">token</var>)</code></dfn> method must run the following
   algorithm:</p>
 
-  <ol><li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
+  <ol><li>If the <var title="">token</var> argument is the empty string,
+   then raise a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception and stop the
+   algorithm.</li>
+
+   <li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
    <code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception and stop the
    algorithm.</li>
 
@@ -6100,7 +6116,11 @@
   </ol><p>The <dfn id=dom-tokenlist-toggle title=dom-tokenlist-toggle><code>toggle(<var title="">token</var>)</code></dfn> method must run the following
   algorithm:</p>
 
-  <ol><li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
+  <ol><li>If the <var title="">token</var> argument is the empty string,
+   then raise a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception and stop the
+   algorithm.</li>
+
+   <li>If the <var title="">token</var> argument contains any <a href=#space-character title="space character">space characters</a>, then raise an
    <code><a href=#invalid_character_err>INVALID_CHARACTER_ERR</a></code> exception and stop the
    algorithm.</li>
 
@@ -72079,6 +72099,7 @@
   Sunava Dutta,
   Susan Borgrink,
   Susan <!--G.--> Lesch,
+  Sylvain Pasche,
   <span lang=tr title="">Tantek Çelik</span>,
   Ted Mielczarek,
   Terrence Wood,

Modified: source
===================================================================
--- source	2009-07-19 20:44:40 UTC (rev 3451)
+++ source	2009-07-20 08:50:47 UTC (rev 3452)
@@ -5877,24 +5877,28 @@
    <dt><var title="">hastoken</var> = <var title="">tokenlist</var> . <code title="dom-tokenlist-contains">contains</code>(<var title="">token</var>)</dt>
    <dd>
     <p>Returns true if the <var title="">token</var> is present; false otherwise.</p>
+    <p>Throws a <code>SYNTAX_ERR</code> exception if <var title="">token</var> is empty.</p>
     <p>Throws an <code>INVALID_CHARACTER_ERR</code> exception if <var title="">token</var> contains any spaces.</p>
    </dd>
 
    <dt><var title="">tokenlist</var> . <code title="dom-tokenlist-add">add</code>(<var title="">token</var>)</dt>
    <dd>
     <p>Adds <var title="">token</var>, unless it is already present.</p>
+    <p>Throws a <code>SYNTAX_ERR</code> exception if <var title="">token</var> is empty.</p>
     <p>Throws an <code>INVALID_CHARACTER_ERR</code> exception if <var title="">token</var> contains any spaces.</p>
    </dd>
 
    <dt><var title="">tokenlist</var> . <code title="dom-tokenlist-remove">remove</code>(<var title="">token</var>)</dt>
    <dd>
     <p>Removes <var title="">token</var> if it is present.</p>
+    <p>Throws a <code>SYNTAX_ERR</code> exception if <var title="">token</var> is empty.</p>
     <p>Throws an <code>INVALID_CHARACTER_ERR</code> exception if <var title="">token</var> contains any spaces.</p>
    </dd>
 
    <dt><var title="">hastoken</var> = <var title="">tokenlist</var> . <code title="dom-tokenlist-toggle">toggle</code>(<var title="">token</var>)</dt>
    <dd>
     <p>Adds <var title="">token</var> if it is not present, or removes it if it is.</p>
+    <p>Throws a <code>SYNTAX_ERR</code> exception if <var title="">token</var> is empty.</p>
     <p>Throws an <code>INVALID_CHARACTER_ERR</code> exception if <var title="">token</var> contains any spaces.</p>
    </dd>
 
@@ -5936,6 +5940,10 @@
 
   <ol>
 
+   <li>If the <var title="">token</var> argument is the empty string,
+   then raise a <code>SYNTAX_ERR</code> exception and stop the
+   algorithm.</li>
+
    <li>If the <var title="">token</var> argument contains any <span
    title="space character">space characters</span>, then raise an
    <code>INVALID_CHARACTER_ERR</code> exception and stop the
@@ -5960,6 +5968,10 @@
 
   <ol>
 
+   <li>If the <var title="">token</var> argument is the empty string,
+   then raise a <code>SYNTAX_ERR</code> exception and stop the
+   algorithm.</li>
+
    <li>If the <var title="">token</var> argument contains any <span
    title="space character">space characters</span>, then raise an
    <code>INVALID_CHARACTER_ERR</code> exception and stop the
@@ -5990,6 +6002,10 @@
 
   <ol>
 
+   <li>If the <var title="">token</var> argument is the empty string,
+   then raise a <code>SYNTAX_ERR</code> exception and stop the
+   algorithm.</li>
+
    <li>If the <var title="">token</var> argument contains any <span
    title="space character">space characters</span>, then raise an
    <code>INVALID_CHARACTER_ERR</code> exception and stop the
@@ -6007,6 +6023,10 @@
 
   <ol>
 
+   <li>If the <var title="">token</var> argument is the empty string,
+   then raise a <code>SYNTAX_ERR</code> exception and stop the
+   algorithm.</li>
+
    <li>If the <var title="">token</var> argument contains any <span
    title="space character">space characters</span>, then raise an
    <code>INVALID_CHARACTER_ERR</code> exception and stop the
@@ -85068,6 +85088,7 @@
   Sunava Dutta,
   Susan Borgrink,
   Susan <!--G.--> Lesch,
+  Sylvain Pasche,
   <span title="" lang="tr">Tantek Çelik</span>,
   Ted Mielczarek,
   Terrence Wood,




More information about the Commit-Watchers mailing list