W3C home > Mailing lists > Public > public-html-commits@w3.org > June 2009

html5/spec Overview.html,1.2402,1.2403

From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 15 Jun 2009 19:27:02 +0000
To: public-html-commits@w3.org
Message-Id: <E1MGHpe-0004uT-RK@lionel-hutz.w3.org>
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv18852

Modified Files:
	Overview.html 
Log Message:
Rename DOMTokenList.has() to .contains() for consistency with DOMStringList. (whatwg r3255)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2402
retrieving revision 1.2403
diff -u -d -r1.2402 -r1.2403
--- Overview.html	15 Jun 2009 19:24:09 -0000	1.2402
+++ Overview.html	15 Jun 2009 19:26:59 -0000	1.2403
@@ -5117,7 +5117,7 @@
   implementations.<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);
-  boolean <a href="#dom-tokenlist-has" title="dom-tokenlist-has">has</a>(in DOMString token);
+  boolean <a href="#dom-tokenlist-contains" title="dom-tokenlist-contains">contains</a>(in DOMString token);
   void <a href="#dom-tokenlist-add" title="dom-tokenlist-add">add</a>(in DOMString token);
   void <a href="#dom-tokenlist-remove" title="dom-tokenlist-remove">remove</a>(in DOMString token);
   boolean <a href="#dom-tokenlist-toggle" title="dom-tokenlist-toggle">toggle</a>(in DOMString token);
@@ -5133,7 +5133,7 @@
     <p>Returns null if <var title="">index</var> is out of range.</p>
    </dd>
 
-   <dt><var title="">has-p</var> = <var title="">tokenlist</var> . <code title="dom-tokenlist-has"><a href="#dom-tokenlist-has">has</a></code>(<var title="">token</var>)</dt>
+   <dt><var title="">contains-p</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 an <code><a href="#invalid_character_err">INVALID_CHARACTER_ERR</a></code> exception if <var title="">token</var> contains any spaces.</p>
@@ -5151,13 +5151,13 @@
     <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="">has-p</var> = <var title="">tokenlist</var> . <code title="dom-tokenlist-toggle"><a href="#dom-tokenlist-toggle">toggle</a></code>(<var title="">token</var>)</dt>
+   <dt><var title="">contains-p</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 an <code><a href="#invalid_character_err">INVALID_CHARACTER_ERR</a></code> exception if <var title="">token</var> contains any spaces.</p>
    </dd>
 
-   <!-- eventually someone will complain about the has-p variable
+   <!-- eventually someone will complain about the contains-p variable
    names above, and we'll replace them with something better that they
    suggest -->
 
@@ -5183,7 +5183,7 @@
   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>
 
-  <p>The <dfn id="dom-tokenlist-has" title="dom-tokenlist-has"><code>has(<var title="">token</var>)</code></dfn> method must run the following
+  <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
@@ -5456,7 +5456,7 @@
    of which is the element to process:</p>
 
    <pre>function splashDamage(node, x, y, damage) {
-  if (node.classList.has('tower') &amp;&amp; // checking the 'class' attribute
+  if (node.classList.contains('tower') &amp;&amp; // checking the 'class' attribute
       node.dataset.x == x &amp;&amp; // reading the 'data-x' attribute
       node.dataset.y == y) { // reading the 'data-y' attribute
     var hp = parseInt(node.dataset.hp); // reading the 'data-hp' attribute
@@ -35742,7 +35742,7 @@
    <pre>function getItems(type) {
   var result = [];
   for (var i = 0; i &lt; document.items.length; i += 1) {
-    if (document.items[i].item.has(type))
+    if (document.items[i].item.contains(type))
       result.push(document.items[i]);
   }
   return result;
@@ -37759,7 +37759,7 @@
    this:</p>
 
    <pre>function getCalendar(node) {
-  while (node &amp;&amp; !node.item.has('vevent'))
+  while (node &amp;&amp; !node.item.contains('vevent'))
     node = node.parentNode;
   if (!node) {
     alert('No event data found.');
Received on Monday, 15 June 2009 19:27:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 15 June 2009 19:27:14 GMT