Skip to content

Commit

Permalink
[e] (0) Revamp the DOMStringMap text. (credit: cm)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2653 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jan 13, 2009
1 parent d269f06 commit 4a60b8d
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 45 deletions.
52 changes: 30 additions & 22 deletions index
Expand Up @@ -5697,29 +5697,39 @@ interface <dfn id=htmloptionscollection-0>HTMLOptionsCollection</dfn> {

<p>The <code><a href=#domstringmap-0>DOMStringMap</a></code> interface represents a set of
name-value pairs. When a <code><a href=#domstringmap-0>DOMStringMap</a></code> object is
instanced, it is associated with three algorithms, one for getting
getting the list of name-value pairs, one for setting names to
certain values, and one for deleting names.</p>
instantiated, it is associated with three algorithms, one for
getting getting the list of name-value pairs, one for setting names
to certain values, and one for deleting names.</p>

<pre class=idl>[NameCreator, NameDeleter, NameGetter, NameSetter]
interface <dfn id=domstringmap-0>DOMStringMap</dfn> {};</pre>

<p>The <span>names of the supported named properties</span> at any
instant are the names obtained from the algorithm for getting the
list of name-value pairs at that instant.</p>

<p>The value of a property with a name <var title="">name</var> at
any instant is the value of the name-value pair with name <var title="">name</var> in the list returned from the algorithm for
getting the list of name-value pairs at that instant.</p>

<p>The behavior for creating a named property and the behavior for
setting a named property are both to invoke the algorithm for
setting names to certain values, passing <var title="">name</var> as
the name and <var title="">value</var> as the value.</p>
<p>The names of the supported named properties on a
<code><a href=#domstringmap-0>DOMStringMap</a></code> object at any instant are the names of
each pair returned from the algorithm for getting the list of
name-value pairs at that instant.</p>

<p>When a <code><a href=#domstringmap-0>DOMStringMap</a></code> object is indexed to retrieve a
named property <var title="">name</var>, the value returned must be
the value component of the name-value pair whose name component is
<var title="">name</var> in the list returned by the algorithm for
getting the list of name-value pairs.</p>

<p>When a <code><a href=#domstringmap-0>DOMStringMap</a></code> object is indexed to create or
modify a named property <var title="">name</var> with value <var title="">value</var>, the algorithm for setting names to certain
values must be run, passing <var title="">name</var> as the name and
the result of converting <var title="">value</var> to a
<code>DOMString</code> as the value.</p>

<p>When a <code><a href=#domstringmap-0>DOMStringMap</a></code> object is indexed to delete a
named property named <var title="">name</var>, the algorithm for
deleting names must be run, passing <var title="">name</var> as the
name.</p>

<p>The behavior for deleting a named property is to invoke the
algorithm for deleting names, passing <var title="">name</var> as
the name.</p>
<p class=note>The <code><a href=#domstringmap-0>DOMStringMap</a></code> interface definition
here is only intended for JavaScript environments. Other language
bindings will need to define how <code><a href=#domstringmap-0>DOMStringMap</a></code> is to be
implemented for those languages.</p>


<h4 id=dom-feature-strings><span class=secno>2.8.6 </span>DOM feature strings</h4>
Expand Down Expand Up @@ -6987,7 +6997,8 @@ background: transparent"&gt;blue&lt;/span&gt;.&lt;/p&gt;</pre>
<dl><dt>The algorithm for getting the list of name-value pairs</dt>

<dd>
<ol><li>Let <var title="">list</var> be an empty list of name-value pairs.</li>
<ol><li>Let <var title="">list</var> be an empty list of name-value
pairs.</li>

<li>For each content attribute on the element whose first five
characters are the string "<code title="">data-</code>", add a
Expand Down Expand Up @@ -38961,9 +38972,6 @@ user reload must be equivalent to .reload()

<h5 id=the-storage-interface><span class=secno>5.10.1.2 </span>The <code><a href=#storage-0>Storage</a></code> interface</h5>

<!-- XXX shouldn't we define somewhere how null values get handled
in these methods? Do they get converted to the empty string or
something? -->
<pre class=idl>interface <dfn id=storage-0>Storage</dfn> {
readonly attribute unsigned long <a href=#dom-storage-length title=dom-Storage-length>length</a>;
[IndexGetter] DOMString <a href=#dom-storage-key title=dom-Storage-key>key</a>(in unsigned long index);
Expand Down
54 changes: 31 additions & 23 deletions source
Expand Up @@ -5653,30 +5653,40 @@ interface <dfn>HTMLOptionsCollection</dfn> {

<p>The <code>DOMStringMap</code> interface represents a set of
name-value pairs. When a <code>DOMStringMap</code> object is
instanced, it is associated with three algorithms, one for getting
getting the list of name-value pairs, one for setting names to
certain values, and one for deleting names.</p>
instantiated, it is associated with three algorithms, one for
getting getting the list of name-value pairs, one for setting names
to certain values, and one for deleting names.</p>

<pre class="idl">[NameCreator, NameDeleter, NameGetter, NameSetter]
interface <dfn>DOMStringMap</dfn> {};</pre>

<p>The <span>names of the supported named properties</span> at any
instant are the names obtained from the algorithm for getting the
list of name-value pairs at that instant.</p>

<p>The value of a property with a name <var title="">name</var> at
any instant is the value of the name-value pair with name <var
title="">name</var> in the list returned from the algorithm for
getting the list of name-value pairs at that instant.</p>

<p>The behavior for creating a named property and the behavior for
setting a named property are both to invoke the algorithm for
setting names to certain values, passing <var title="">name</var> as
the name and <var title="">value</var> as the value.</p>
<p>The names of the supported named properties on a
<code>DOMStringMap</code> object at any instant are the names of
each pair returned from the algorithm for getting the list of
name-value pairs at that instant.</p>

<p>When a <code>DOMStringMap</code> object is indexed to retrieve a
named property <var title="">name</var>, the value returned must be
the value component of the name-value pair whose name component is
<var title="">name</var> in the list returned by the algorithm for
getting the list of name-value pairs.</p>

<p>When a <code>DOMStringMap</code> object is indexed to create or
modify a named property <var title="">name</var> with value <var
title="">value</var>, the algorithm for setting names to certain
values must be run, passing <var title="">name</var> as the name and
the result of converting <var title="">value</var> to a
<code>DOMString</code> as the value.</p>

<p>When a <code>DOMStringMap</code> object is indexed to delete a
named property named <var title="">name</var>, the algorithm for
deleting names must be run, passing <var title="">name</var> as the
name.</p>

<p>The behavior for deleting a named property is to invoke the
algorithm for deleting names, passing <var title="">name</var> as
the name.</p>
<p class="note">The <code>DOMStringMap</code> interface definition
here is only intended for JavaScript environments. Other language
bindings will need to define how <code>DOMStringMap</code> is to be
implemented for those languages.</p>


<h4>DOM feature strings</h4>
Expand Down Expand Up @@ -7098,7 +7108,8 @@ background: transparent">blue&lt;/span>.&lt;/p></pre>
<dd>
<ol>

<li>Let <var title="">list</var> be an empty list of name-value pairs.</li>
<li>Let <var title="">list</var> be an empty list of name-value
pairs.</li>

<li>For each content attribute on the element whose first five
characters are the string "<code title="">data-</code>", add a
Expand Down Expand Up @@ -44355,9 +44366,6 @@ user reload must be equivalent to .reload()

<h5>The <code>Storage</code> interface</h5>

<!-- XXX shouldn't we define somewhere how null values get handled
in these methods? Do they get converted to the empty string or
something? -->
<pre class="idl">interface <dfn>Storage</dfn> {
readonly attribute unsigned long <span title="dom-Storage-length">length</span>;
[IndexGetter] DOMString <span title="dom-Storage-key">key</span>(in unsigned long index);
Expand Down

0 comments on commit 4a60b8d

Please sign in to comment.