W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2010

Re: Event.timeStamp

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 18 Oct 2010 22:47:47 -0400
Message-ID: <4CBD06D3.8010905@mit.edu>
To: www-dom@w3.org
On 10/18/10 10:41 PM, Cameron McCormack wrote:
> I also think we should make Event.timeStamp be not the time at which the
> event was created (the construction of the Event object?) but the time
> at which the event represented by the Event object occurred.

This is particularly relevant to situations in which the event is 
_about_ to occur and the UA wants to notify scripts of this.  While it 
can only guess at when the event will really occur (since the scripts 
could take a while), that still seems more useful than reporting some 
time in the past that has nothing to do with the event in question.

We (Mozilla) actually ran into this with MozBeforePaint events.  For now 
we're having the timeStamp on those represent the time when the paint is 
conceptually happening (i.e. the sampling time that will be used for 
animations when the paint happens).

-Boris
Received on Tuesday, 19 October 2010 02:48:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:06 GMT