- From: poot <cvsmail@w3.org>
- Date: Wed, 9 Sep 2009 18:50:13 +0900 (JST)
- To: public-html-diffs@w3.org
hixie: valueAsDate has to always return a new object, since the Date
objects are mutable. (whatwg r3776)
http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2945&r2=1.2946&f=h
http://html5.org/tools/web-apps-tracker?from=3775&to=3776
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2945
retrieving revision 1.2946
diff -u -d -r1.2945 -r1.2946
--- Overview.html 9 Sep 2009 09:41:24 -0000 1.2945
+++ Overview.html 9 Sep 2009 09:49:53 -0000 1.2946
@@ -13583,7 +13583,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>
@@ -13609,9 +13609,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><div class="example">
Received on Wednesday, 9 September 2009 09:50:49 UTC