[whatwg] DOMTimeStamp binding

Darin Adler darin at apple.com
Wed Feb 11 15:03:01 PST 2009


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




More information about the whatwg mailing list