Re: [dom] High resolution timing for events (#23)

> Firefox workaround: None, already broken on Firefox.

People have said this a few times on the thread but this isn't quite right.

Some Firefox events in some cases didn't provide the information. There is a [long-running thread](https://bugzilla.mozilla.org/show_bug.cgi?id=77992) (opened in 2001!) about it, and Firefox slowly but surely fixed many of these cases.

DOM3 allowed Firefox to return 0 for "not supported", which they did, and jQuery [fixed it](https://github.com/jquery/jquery/blob/1de834672959636da8c06263c3530226b17a84c3/src/event.js#L577) to normalize it to Date.now(). In practice, this means that "Firefox returned 0, therefore it was broken anyway", isn't actually true with any code that uses jQuery.

To recap: Chrome, Safari, and IE reliably (at least recently?) return Date.now() for `e.timeStamp`, and the inconsistency has been fixed by jQuery, leaking the assumption of "since 1970" to the web.

jQuery [documents this assumption](https://api.jquery.com/event.timeStamp/) and DOM4 canonized it, which Firefox noticed in 2011, which caused them to change their implementations for many events.

I also just want to reiterate that the fact that some cases don't work on Firefox doesn't take away from the fact that some cases do! It's these cases that are causing the compatibility hazard.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/23#issuecomment-185920481

Received on Thursday, 18 February 2016 21:05:22 UTC