Open
Bug 1131785
Opened 10 years ago
Updated 2 years ago
Event.timeStamp measures microseconds, should be milliseconds
Categories
(Core :: DOM: Events, defect, P5)
Tracking
()
UNCONFIRMED
People
(Reporter: jre, Unassigned)
Details
According to the DOM Level 2 Event Model specification[1] and MDN's documentation[2], the Event.timeStamp property is supposed to represent the time of an event "in milliseconds relative to the epoch" (a DOMTimeStamp). However, Firefox actually returns values in microseconds.
To reproduce, open the Firefox developer console and enter one of the following:
var event = new Event('example')
console.log(event.timeStamp);
var event = document.createEvent('CustomEvent');
event.initCustomEvent('example', true, true, null);
console.log(event.timeStamp);
Expected result:
"1423603626951" (or a value of similar magnitude) is displayed.
Actual result:
"1423603626951788" (or a value of similar magnitude) is displayed.
[1]: http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-Event-timeStamp
[2]: https://developer.mozilla.org/en-US/docs/Web/API/event.timeStamp
Comment 1•10 years ago
|
||
There is bug 1026804 and Bug 77992.
So things are changing, possibly in the specs too, if things go well.
(You're referring an ancient DOM 2 Event spec, mostly obsolete.
https://dom.spec.whatwg.org/#interface-event is newer)
Comment 2•10 years ago
|
||
And just for reference, I hope to make progress on those bugs next week.
Comment 3•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•