Re: Use case for the timestamp attribute

Hi, Matt-

Matt Brubeck wrote (on 4/5/11 11:08 PM):
> On 04/05/2011 12:15 AM, Anders Höckersten wrote:
>> Let's say you have a webpage that for whatever reason wants to know
>> exactly when the user starts touching the screen (some kind of game
>> perhaps?). Now, it's easy to do this by create your own timestamp
>> whenever the handlers for TouchStart is called. However, this only
>> provide measurements of when the call to TouchStart happened. If the
>> system is busy, this call will be delayed compared to when the actual
>> touch event happened, so the calculated timestamp will be off by a few
>> milliseconds (or even more than that).
>
> I think this problem is best solved by the Event.timeStamp attribute
> from DOM Level 2 Events. If Event.timeStamp is not adequate, it should
> be fixed (see discussion at [1]).
>
> http://lists.w3.org/Archives/Public/www-dom/2010OctDec/0069.html

My inclusion of the timestamp was simply to reflect Event.timeStamp, 
which TouchStart inherits from.

If we do intend to provide some generic way for authors to describe a 
"gesture" for a high-level event in terms of characteristics of one or 
more low-level events, having the timestamp there would be a crucial 
aspect.

Regards-
-Doug Schepers
W3C Team Contact, SVG, WebApps, and Web Events WGs

Received on Tuesday, 12 April 2011 14:51:07 UTC