[html5] r3776 - [] (0) valueAsDate has to always return a new object, since the Date objects are [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Sep 9 02:54:10 PDT 2009


Author: ianh
Date: 2009-09-09 02:54:08 -0700 (Wed, 09 Sep 2009)
New Revision: 3776

Modified:
   index
   source
Log:
[] (0) valueAsDate has to always return a new object, since the Date objects are mutable.

Modified: index
===================================================================
--- index	2009-09-09 09:45:40 UTC (rev 3775)
+++ index	2009-09-09 09:54:08 UTC (rev 3776)
@@ -15537,7 +15537,7 @@
   </dl><div>
 
   <p>The <dfn id=dom-time-valueasdate title=dom-time-valueAsDate><code>valueAsDate</code></dfn> IDL
-  attribute must return either null or a <code>Date</code> object
+  attribute must return either null or a new <code>Date</code> object
   initialised to the relevant value as defined by the following
   list:</p>
 
@@ -15563,9 +15563,10 @@
 
    <dd>The null value.</dd>
 
-  </dl><p>The same <code>Date</code> object must be returned until the
-  <code title=attr-time-datetime><a href=#attr-time-datetime>datetime</a></code> attribute is
-  removed or changed.</p>
+  </dl><p>When a <code>Date</code> object is to be returned, a new one must
+  be constructed.</p> <!-- yes, this means .valueAsDate !=
+  .valueAsDate, but the object is mutable, so it'd be weird if we
+  didn't do that -->
 
   </div>
 

Modified: source
===================================================================
--- source	2009-09-09 09:45:40 UTC (rev 3775)
+++ source	2009-09-09 09:54:08 UTC (rev 3776)
@@ -16644,7 +16644,7 @@
 
   <p>The <dfn
   title="dom-time-valueAsDate"><code>valueAsDate</code></dfn> IDL
-  attribute must return either null or a <code>Date</code> object
+  attribute must return either null or a new <code>Date</code> object
   initialised to the relevant value as defined by the following
   list:</p>
 
@@ -16678,9 +16678,10 @@
 
   </dl>
 
-  <p>The same <code>Date</code> object must be returned until the
-  <code title="attr-time-datetime">datetime</code> attribute is
-  removed or changed.</p>
+  <p>When a <code>Date</code> object is to be returned, a new one must
+  be constructed.</p> <!-- yes, this means .valueAsDate !=
+  .valueAsDate, but the object is mutable, so it'd be weird if we
+  didn't do that -->
 
   </div>
 




More information about the Commit-Watchers mailing list