W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2009

[whatwg] DOMTimeStamp binding

From: Darin Adler <darin@apple.com>
Date: Wed, 11 Feb 2009 15:03:01 -0800
Message-ID: <8F614BCE-F819-4466-B195-7CE7CE540030@apple.com>
On Feb 11, 2009, at 12:14 PM, Kartikaya Gupta wrote:

> I updated to Safari 3.2 on Windows (which looks it also has WebKit  
> 525.27.1) and you're right, it is now showing "number" instead of  
> "object". I guess this was changed not too long ago. So then my  
> question is: why was it changed?

No, this was not changed.

I don't understand why you were getting that strange result, but  
WebKit has always shown "number" for this. I went back to old  
versions, including digging out a copy of Safari 2 and every version I  
tested yields a number. There was never any code that attempted to  
return anything except a number.

More to the point, there's also a false premise in the specification's  
claim that this should be a Date. The Date class in JavaScript boils  
down to a double for its internal representation; I believe that's by  
design and not just a detail of the WebKit implementation. So the  
claim that a number, also a double, can't handle the entire range of  
DOMTimestamp, but the Date class can is probably incorrect. Maybe  
someone can give a specific example with details of how this would go  
wrong ? I don?t think there is any such example.

     -- Darin
Received on Wednesday, 11 February 2009 15:03:01 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:09 UTC