[html5] r2653 - [e] (0) Revamp the DOMStringMap text. (credit: cm)

whatwg at whatwg.org whatwg at whatwg.org
Tue Jan 13 02:14:05 PST 2009


Author: ianh
Date: 2009-01-13 02:14:04 -0800 (Tue, 13 Jan 2009)
New Revision: 2653

Modified:
   index
   source
Log:
[e] (0) Revamp the DOMStringMap text. (credit: cm)

Modified: index
===================================================================
--- index	2009-01-13 09:40:03 UTC (rev 2652)
+++ index	2009-01-13 10:14:04 UTC (rev 2653)
@@ -5697,31 +5697,41 @@
 
   <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 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>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>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>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>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>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>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 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>
 
   <p>DOM3 Core defines mechanisms for checking for interface support,
@@ -6987,7 +6997,8 @@
   <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
@@ -38961,9 +38972,6 @@
 
   <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);

Modified: source
===================================================================
--- source	2009-01-13 09:40:03 UTC (rev 2652)
+++ source	2009-01-13 10:14:04 UTC (rev 2653)
@@ -5653,32 +5653,42 @@
 
   <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 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>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>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>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>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>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>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 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>
 
   <p>DOM3 Core defines mechanisms for checking for interface support,
@@ -7098,7 +7108,8 @@
    <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
@@ -44355,9 +44366,6 @@
 
   <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);




More information about the Commit-Watchers mailing list