Re: [whatwg/dom] Update Event.timeStamp type to DOMHighResTimeStamp. (#420)

majido commented on this pull request.



> @@ -907,6 +915,14 @@ it, and optionally given a <a>Realm</a> <var>realm</var>, run these steps:</p>
  <a>dictionary member</a> and then set the attribute to the default value of that
  <a>dictionary member</a>.
 
+ <li><p>If available, set <var>event</var>'s {{Event/timeStamp}} attribute to a
+ {{DOMHighResTimeStamp}} representing the <var>event</var>'s <dfn>occurence time</dfn> which is
+ the high resolution time from the <a>time origin</a> to the occurrence that the event is
+ signaling, for example the moment when a particular user interaction occurred.

I removed "If available". I was thinking of cases where there is not any high resolution time available on the underlying event, e.g., some older Windows devices don't have a high resolution clock or the clock is not usable across processes. In such cases, Chromium uses the timestamp when event was received by renderer process as the closest thing we can have to the "occurrence time". 

I guess there is no need to have the spec special case this as the term "occurrence time" gives enough flexibility to user agents to handle such limitations. Also per your suggestion, I added an example (for macOs)  which should help guide how occurrence time should be interpreted by implementations.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/420#discussion_r126458160

Received on Monday, 10 July 2017 15:37:45 UTC