Re: [whatwg] DOMTimeStamp binding

2009-02-12 Thread Kartikaya Gupta

On Thu, 12 Feb 2009 07:03:22 +0100, Simon Pieters sim...@opera.com wrote:
 
 On Wed, 11 Feb 2009 21:14:44 +0100, Kartikaya Gupta 
 lists.weba...@stakface.com 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? And seeing as Opera, WebKit, and Gecko are in  
  agreement now to return a number rather than a Date in ECMAScript, will  
  the DOM 3 Core spec be updated? Or will this get rolled into Web DOM  
  Core and/or HTML5?
 
 Right now Web DOM Core says:
 
A DOMTimeStamp represents a number of milliseconds. 
 
   typedef unsigned long long DOMTimeStamp;
 
 
 ...and then refers to WebIDL for what that means to ECMAScript.
 

It seems to me the simplest approach would be to bind DOMTimeStamp to a number 
for ECMAScript (the typedef should then make it unnecessary to explicitly 
define in WebIDL), and create a new type to represent things that actually 
return Date objects like the HTMLInputElement.valueAsDate in HTML5. This is 
likely what I'll end up doing for our IDL files anyhow so that all the bindings 
get generated correctly.

Cheers,
kats



Re: [whatwg] DOMTimeStamp binding

2009-02-11 Thread Simon Pieters


On Wed, 11 Feb 2009 21:14:44 +0100, Kartikaya Gupta 
lists.weba...@stakface.com 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? And seeing as Opera, WebKit, and Gecko are in  
agreement now to return a number rather than a Date in ECMAScript, will  
the DOM 3 Core spec be updated? Or will this get rolled into Web DOM  
Core and/or HTML5?


Right now Web DOM Core says:

  A DOMTimeStamp represents a number of milliseconds. 


 typedef unsigned long long DOMTimeStamp;


...and then refers to WebIDL for what that means to ECMAScript.

--
Simon Pieters
Opera Software