Frozen Date objects?

Allen Wirfs-Brock allen at
Mon Jul 22 07:42:00 PDT 2013

On Jul 21, 2013, at 11:05 PM, Jonas Sicking wrote:
> I still don't feel like I have a clear answer to two fundamental
> questions when designing DOM specs:
> 1. Is it ever appropriate to return Date objects from methods in the
> DOM? If so, in what circumstances. Two cases where we are currently
> considering using Date objects are:
> 2. Is it ever appropriate to return a Date object from a "readonly"
> property. 

How about :

3.  Is it ever appropriate for a DOM API to accept and retain a reference to a Date object?

The timevalue of a Date object that was passed to a DOM API can be modified by the original client after the DOM call returns.  If the DOM has retained and uses a reference to the Date object it will see the modified timevalue rather than the originally pass timevalue.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list