Anne van Kesteren (2013-07-17T19:06:04.000Z)
On Wed, Jul 17, 2013 at 11:44 AM, Anne van Kesteren <annevk at annevk.nl> wrote:
> Is it intentional that Date objects cannot be frozen?
>
> Use case: exposing the time of an event through a Date object while
> not allowing fiddling with it.

I was told frozen is only for properties. That doesn't seem ideal.

Then IDL defines to always return a new Date object, which seems bad:

% <video>.startDate != <video>.startDate
true

Is there a better way?


--
http://annevankesteren.nl/
domenic at domenicdenicola.com (2013-07-24T00:36:11.879Z)
On Wed, Jul 17, 2013 at 11:44 AM, Anne van Kesteren <annevk at annevk.nl> wrote:
> Is it intentional that Date objects cannot be frozen?
>
> Use case: exposing the time of an event through a Date object while
> not allowing fiddling with it.

I was told frozen is only for properties. That doesn't seem ideal.

Then IDL defines to always return a new Date object, which seems bad:

```
% <video>.startDate != <video>.startDate
true
```

Is there a better way?