[html5] r4484 - [e] (0) Clarify toggle()'s return value. Fixing http://www.w3.org/Bugs/Public/sh [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Jan 5 03:19:10 PST 2010


Author: ianh
Date: 2010-01-05 03:19:05 -0800 (Tue, 05 Jan 2010)
New Revision: 4484

Modified:
   complete.html
   index
   source
Log:
[e] (0) Clarify toggle()'s return value.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=8364

Modified: complete.html
===================================================================
--- complete.html	2010-01-05 11:16:07 UTC (rev 4483)
+++ complete.html	2010-01-05 11:19:05 UTC (rev 4484)
@@ -6130,7 +6130,10 @@
 
    <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>Adds <var title="">token</var> if it is not present, or removes
+    it if it is. Returns true if <var title="">token</var> is now
+    present (it was added); returns false if it is not (it was
+    removed).</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>

Modified: index
===================================================================
--- index	2010-01-05 11:16:07 UTC (rev 4483)
+++ index	2010-01-05 11:19:05 UTC (rev 4484)
@@ -5965,7 +5965,10 @@
 
    <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>Adds <var title="">token</var> if it is not present, or removes
+    it if it is. Returns true if <var title="">token</var> is now
+    present (it was added); returns false if it is not (it was
+    removed).</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>

Modified: source
===================================================================
--- source	2010-01-05 11:16:07 UTC (rev 4483)
+++ source	2010-01-05 11:19:05 UTC (rev 4484)
@@ -5774,7 +5774,10 @@
 
    <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>Adds <var title="">token</var> if it is not present, or removes
+    it if it is. Returns true if <var title="">token</var> is now
+    present (it was added); returns false if it is not (it was
+    removed).</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>




More information about the Commit-Watchers mailing list