Skip to content

Commit

Permalink
[] (0) Make data-* always lowercase.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@1945 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 25, 2008
1 parent 31f6d50 commit f9cb442
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
20 changes: 14 additions & 6 deletions index
Expand Up @@ -7969,8 +7969,13 @@ background: transparent">blue&lt;/span>.&lt;/p></pre>
<p>A <dfn id=custom>custom data attribute</dfn> is an attribute whose name
starts with the string "<dfn id=data-
title="attr-data-*"><code>data-</code></dfn>", has at least one character
after the hyphen, is <a href="#xml-compatible">XML-compatible</a>, and has
no namespace.
after the hyphen, is <a href="#xml-compatible">XML-compatible</a>, has no
namespace, and contains no characters in the range U+0041 .. U+005A (LATIN
CAPITAL LETTER A LATIN CAPITAL LETTER Z).

<p class=note>All attributes in <a href="#html-">HTML documents</a> get
lowercased automatically, so the restriction on uppercase letters doesn't
affect such documents.

<p><a href="#custom" title="custom data attribute">Custom data
attributes</a> are intended to store custom data private to the page or
Expand All @@ -7996,7 +8001,8 @@ background: transparent">blue&lt;/span>.&lt;/p></pre>
<dd>
<ol>
<li>Let <var title="">name</var> be the concatenation of the string
<code title="">data-</code> and the name passed to the algorithm.
<code title="">data-</code> and the name passed to the algorithm, <a
href="#converting0">converted to lowercase</a>.

<li>If the element does not have an attribute with the name <var
title="">name</var>, then the name has no corresponding value, abort.
Expand All @@ -8010,7 +8016,8 @@ background: transparent">blue&lt;/span>.&lt;/p></pre>
<dd>
<ol>
<li>Let <var title="">name</var> be the concatenation of the string
<code title="">data-</code> and the name passed to the algorithm.
<code title="">data-</code> and the name passed to the algorithm, <a
href="#converting0">converted to lowercase</a>.

<li>Let <var title="">value</var> be the value passed to the algorithm.

Expand All @@ -8027,7 +8034,8 @@ background: transparent">blue&lt;/span>.&lt;/p></pre>
<dd>
<ol>
<li>Let <var title="">name</var> be the concatenation of the string
<code title="">data-</code> and the name passed to the algorithm.
<code title="">data-</code> and the name passed to the algorithm, <a
href="#converting0">converted to lowercase</a>.

<li>Remove the attribute with the name <var title="">name</var>, if such
an attribute exists. Do nothing otherwise.
Expand Down Expand Up @@ -35947,7 +35955,7 @@ user reload must be equivalent to .reload()
document</a>, or otherwise any ports in that document's <a
href="#list-of3">list of message ports</a>, if the document is not the <a
href="#active">active document</a>, must be <span>deactivated</span> and
unentangled..
unentangled.

<p class=big-issue>Also, <code title=event-unload>unload</code> events
should fire.
Expand Down
17 changes: 11 additions & 6 deletions source
Expand Up @@ -5954,8 +5954,13 @@ background: transparent">blue&lt;/span>.&lt;/p></pre>
<p>A <dfn>custom data attribute</dfn> is an attribute whose name
starts with the string "<dfn
title="attr-data-*"><code>data-</code></dfn>", has at least one
character after the hyphen, is <span>XML-compatible</span>, and has
no namespace.</p>
character after the hyphen, is <span>XML-compatible</span>, has no
namespace, and contains no characters in the range U+0041 .. U+005A
(LATIN CAPITAL LETTER A LATIN CAPITAL LETTER Z).</p>

<p class="note">All attributes in <span>HTML documents</span> get
lowercased automatically, so the restriction on uppercase letters
doesn't affect such documents.</p>

<p><span title="custom data attribute">Custom data attributes</span>
are intended to store custom data private to the page or
Expand Down Expand Up @@ -5983,7 +5988,7 @@ background: transparent">blue&lt;/span>.&lt;/p></pre>

<li>Let <var title="">name</var> be the concatenation of the
string <code title="">data-</code> and the name passed to the
algorithm.</li>
algorithm, <span>converted to lowercase</span>.</li>

<li>If the element does not have an attribute with the name <var
title="">name</var>, then the name has no corresponding value,
Expand All @@ -6002,7 +6007,7 @@ background: transparent">blue&lt;/span>.&lt;/p></pre>

<li>Let <var title="">name</var> be the concatenation of the
string <code title="">data-</code> and the name passed to the
algorithm.</li>
algorithm, <span>converted to lowercase</span>.</li>

<li>Let <var title="">value</var> be the value passed to the
algorithm.</li>
Expand All @@ -6025,7 +6030,7 @@ background: transparent">blue&lt;/span>.&lt;/p></pre>

<li>Let <var title="">name</var> be the concatenation of the
string <code title="">data-</code> and the name passed to the
algorithm.</li>
algorithm, <span>converted to lowercase</span>.</li>

<li>Remove the attribute with the name <var title="">name</var>,
if such an attribute exists. Do nothing otherwise.</li>
Expand Down Expand Up @@ -33410,7 +33415,7 @@ user reload must be equivalent to .reload()
document</span>, or otherwise any ports in that document's
<span>list of message ports</span>, if the document is not the
<span>active document</span>, must be <span>deactivated</span> and
unentangled..</p>
unentangled.</p>

<p class="big-issue">Also, <code title="event-unload">unload</code>
events should fire.</p>
Expand Down

0 comments on commit f9cb442

Please sign in to comment.