Skip to content

Commit

Permalink
[] (0) Define DOMTokenList's behaviour with empty string arguments.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@3452 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 20, 2009
1 parent ea87362 commit 1171681
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 5 deletions.
31 changes: 26 additions & 5 deletions index
Expand Up @@ -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-&mdash;-date:-01-jan-1901>Draft Standard &mdash; 19 July 2009</h2>
<h2 class="no-num no-toc" id=draft-standard-&mdash;-date:-01-jan-1901>Draft Standard &mdash; 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>-->
Expand Down Expand Up @@ -6001,24 +6001,28 @@ interface <dfn id=propertynodelist>PropertyNodeList</dfn> : <span>NodeList</span
<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>

Expand Down Expand Up @@ -6047,7 +6051,11 @@ interface <dfn id=propertynodelist>PropertyNodeList</dfn> : <span>NodeList</span
<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>

Expand All @@ -6065,7 +6073,11 @@ interface <dfn id=propertynodelist>PropertyNodeList</dfn> : <span>NodeList</span
</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>

Expand All @@ -6089,7 +6101,11 @@ interface <dfn id=propertynodelist>PropertyNodeList</dfn> : <span>NodeList</span
</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>

Expand All @@ -6100,7 +6116,11 @@ interface <dfn id=propertynodelist>PropertyNodeList</dfn> : <span>NodeList</span
</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>

Expand Down Expand Up @@ -72079,6 +72099,7 @@ time:empty { binding: <i title="">time</i>; }</pre>
Sunava Dutta,
Susan Borgrink,
Susan <!--G.--> Lesch,
Sylvain Pasche,
<span lang=tr title="">Tantek &Ccedil;elik</span>,
Ted Mielczarek,
Terrence Wood,
Expand Down
21 changes: 21 additions & 0 deletions source
Expand Up @@ -5877,24 +5877,28 @@ interface <dfn>PropertyNodeList</dfn> : <span>NodeList</span> {
<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>

Expand Down Expand Up @@ -5936,6 +5940,10 @@ interface <dfn>PropertyNodeList</dfn> : <span>NodeList</span> {

<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
Expand All @@ -5960,6 +5968,10 @@ interface <dfn>PropertyNodeList</dfn> : <span>NodeList</span> {

<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
Expand Down Expand Up @@ -5990,6 +6002,10 @@ interface <dfn>PropertyNodeList</dfn> : <span>NodeList</span> {

<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
Expand All @@ -6007,6 +6023,10 @@ interface <dfn>PropertyNodeList</dfn> : <span>NodeList</span> {

<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
Expand Down Expand Up @@ -85068,6 +85088,7 @@ time:empty { binding: <i title="">time</i>; }</pre>
Sunava Dutta,
Susan Borgrink,
Susan <!--G.--> Lesch,
Sylvain Pasche,
<span title="" lang="tr">Tantek &Ccedil;elik</span>,
Ted Mielczarek,
Terrence Wood,
Expand Down

0 comments on commit 1171681

Please sign in to comment.