W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2009

Re: DOMTimeStamp binding

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 11 Feb 2009 12:53:40 -0500
Message-ID: <499310A4.5060301@mit.edu>
To: Kartikaya Gupta <lists.webapps@stakface.com>
CC: whatwg@whatwg.org, public-webapps@w3.org

Kartikaya Gupta wrote:
>> For Java, DOMTimeStamp is bound to the long type. For ECMAScript,
>> DOMTimeStamp is bound to the Date type because the range of the
>> integer type is too small.
> 
> I get "number" in Opera and Firefox, and "object" in Webkit. Is there
> a reason Opera and Firefox bind the timestamps to numbers instead of
> the Date object?

In the case of Gecko, simply because no one wrote the code to do it, I 
suspect.

> Are there any websites that depend on this behavior?

Given the bugs Gecko has had with timeStamp (starting with inconsistent 
units for it), I doubt sites depend on anything much here.

> Also, I'm not sure if WebIDL should say something for this; right now
> the DOM IDL files do a "typedef unsigned long long DOMTimeStamp",
> which corresponds to the Java binding but not the ECMAScript binding.

Yep.  That's exactly the IDL Gecko uses.

-Boris
Received on Wednesday, 11 February 2009 17:54:27 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:30 GMT