W3C home > Mailing lists > Public > public-html-commits@w3.org > February 2010

html5/spec-author-view Overview.html,1.689,1.690 acknowledgements.html,1.571,1.572 elements.html,1.25,1.26 spec.html,1.694,1.695

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Sun, 14 Feb 2010 12:07:01 +0000
To: public-html-commits@w3.org
Message-Id: <E1NgdFd-0002ZB-AC@lionel-hutz.w3.org>
Update of /sources/public/html5/spec-author-view
In directory hutz:/tmp/cvs-serv9849

Modified Files:
	Overview.html acknowledgements.html elements.html spec.html 
Log Message:
Make dataset camelCase hyphenated names. (whatwg r4737)

[updated by splitter]


Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/Overview.html,v
retrieving revision 1.689
retrieving revision 1.690
diff -u -d -r1.689 -r1.690
--- Overview.html	14 Feb 2010 11:26:55 -0000	1.689
+++ Overview.html	14 Feb 2010 12:06:58 -0000	1.690
@@ -302,7 +302,7 @@
    </dl><p>This specification is available in the following formats: 
     <a href="spec.html">single page HTML</a>,
     <a href="Overview.html">multipage HTML</a>.
-This is revision 1.3783.
+This is revision 1.3784.
    </p> 
    <p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
    &#169; 2009 <a href="http://www.w3.org/"><abbr title="World Wide

Index: elements.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/elements.html,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- elements.html	14 Feb 2010 10:27:05 -0000	1.25
+++ elements.html	14 Feb 2010 12:06:58 -0000	1.26
@@ -758,7 +758,11 @@
   any number of <a href="#custom-data-attribute" title="custom data attribute">custom data
   attributes</a> specified, with any value.</p><hr><dl class="domintro"><dt><var title="">element</var> . <code title="dom-dataset"><a href="#dom-dataset">dataset</a></code></dt>
    <dd>
+
     <p>Returns a <code><a href="#domstringmap">DOMStringMap</a></code> object for the element's <code title="attr-data-*"><a href="#attr-data">data-*</a></code> attributes.</p>
+
+    <p>Hyphenated names become camel-cased. For example, <code title="">data-foo-bar=""</code> becomes <code title="">element.dataset.fooBar</code>.</p>
+
    </dd>
 
   </dl><div class="example">
@@ -766,15 +770,18 @@
    <p>If a Web page wanted an element to represent a space ship,
    e.g. as part of a game, it would have to use the <code title="attr-class"><a href="#classes">class</a></code> attribute along with <code title="attr-data-*"><a href="#attr-data">data-*</a></code> attributes:</p>
 
-   <pre>&lt;div class="spaceship" data-id="92432"
+   <pre>&lt;div class="spaceship" data-ship-id="92432"
      data-weapons="laser 2" data-shields="50%"
      data-x="30" data-y="10" data-z="90"&gt;
  &lt;button class="fire"
-         onclick="spaceships[this.parentNode.dataset.id].fire()"&gt;
+         onclick="spaceships[this.parentNode.dataset.shipId].fire()"&gt;
   Fire
  &lt;/button&gt;
 &lt;/div&gt;</pre>
 
+   <p>Notice how the hyphenated attribute name becomes capitalized in
+   the API.</p>
+
   </div><p>Authors should carefully design such extensions so that when the
   attributes are ignored and any associated CSS dropped, the page is
   still usable.</p><p>JavaScript libraries may use the <a href="#custom-data-attribute" title="custom data

Index: spec.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/spec.html,v
retrieving revision 1.694
retrieving revision 1.695
diff -u -d -r1.694 -r1.695
--- spec.html	14 Feb 2010 11:26:55 -0000	1.694
+++ spec.html	14 Feb 2010 12:06:58 -0000	1.695
@@ -300,7 +300,7 @@
    </dl><p>This specification is available in the following formats: 
     <a href=spec.html>single page HTML</a>,
     <a href=Overview.html>multipage HTML</a>.
-This is revision 1.3783.
+This is revision 1.3784.
    </p> 
    <p class=copyright><a href=http://www.w3.org/Consortium/Legal/ipr-notice#Copyright>Copyright</a>
    © 2009 <a href=http://www.w3.org/><abbr title="World Wide
@@ -3035,7 +3035,11 @@
   any number of <a href=#custom-data-attribute title="custom data attribute">custom data
   attributes</a> specified, with any value.</p><hr><dl class=domintro><dt><var title="">element</var> . <code title=dom-dataset><a href=#dom-dataset>dataset</a></code></dt>
    <dd>
+
     <p>Returns a <code><a href=#domstringmap>DOMStringMap</a></code> object for the element's <code title=attr-data-*><a href=#attr-data>data-*</a></code> attributes.</p>
+
+    <p>Hyphenated names become camel-cased. For example, <code title="">data-foo-bar=""</code> becomes <code title="">element.dataset.fooBar</code>.</p>
+
    </dd>
 
   </dl><div class=example>
@@ -3043,15 +3047,18 @@
    <p>If a Web page wanted an element to represent a space ship,
    e.g. as part of a game, it would have to use the <code title=attr-class><a href=#classes>class</a></code> attribute along with <code title=attr-data-*><a href=#attr-data>data-*</a></code> attributes:</p>
 
-   <pre>&lt;div class="spaceship" data-id="92432"
+   <pre>&lt;div class="spaceship" data-ship-id="92432"
      data-weapons="laser 2" data-shields="50%"
      data-x="30" data-y="10" data-z="90"&gt;
  &lt;button class="fire"
-         onclick="spaceships[this.parentNode.dataset.id].fire()"&gt;
+         onclick="spaceships[this.parentNode.dataset.shipId].fire()"&gt;
   Fire
  &lt;/button&gt;
 &lt;/div&gt;</pre>
 
+   <p>Notice how the hyphenated attribute name becomes capitalized in
+   the API.</p>
+
   </div><p>Authors should carefully design such extensions so that when the
   attributes are ignored and any associated CSS dropped, the page is
   still usable.</p><p>JavaScript libraries may use the <a href=#custom-data-attribute title="custom data
@@ -28697,6 +28704,7 @@
   Corprew Reed,
   Craig Cockburn,
   Csaba Gabor,
+  Csaba Marton,
   Daniel Barclay,
   Daniel Bratell,
   Daniel Brooks,

Index: acknowledgements.html
===================================================================
RCS file: /sources/public/html5/spec-author-view/acknowledgements.html,v
retrieving revision 1.571
retrieving revision 1.572
diff -u -d -r1.571 -r1.572
--- acknowledgements.html	14 Feb 2010 04:47:52 -0000	1.571
+++ acknowledgements.html	14 Feb 2010 12:06:58 -0000	1.572
@@ -399,6 +399,7 @@
   Corprew Reed,
   Craig Cockburn,
   Csaba Gabor,
+  Csaba Marton,
   Daniel Barclay,
   Daniel Bratell,
   Daniel Brooks,
Received on Sunday, 14 February 2010 12:07:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 14 February 2010 12:07:03 GMT