Open
Bug 323039
Opened 20 years ago
Updated 3 years ago
Various other events need timeStamps
Categories
(Core :: DOM: Events, defect, P5)
Core
DOM: Events
Tracking
()
REOPENED
People
(Reporter: martijn.martijn, Unassigned)
References
()
Details
See url.
I've tested a bit, but those event also have a timeStamp of 0.
They should also have a timestamp, right?
It seems to work when I add this in the code.
event.time = PR_Now();
Is that the right approach?
Should I do that for all the instances I see it in lxr?
Comment 1•20 years ago
|
||
PR_Now() is probably the wrong thing (since we don't want time in _microseconds_). A lot of existing code uses PR_IntervalNow() (which is milliseconds on Unix, but varies on Windows), but some places do PR_Now().
It might be worth deciding what event.timeStamp actually _is_ and then making it consistent.
Also note bug 77992.
Comment 2•20 years ago
|
||
Ccing some folks who might be interested in this.
OS: Windows XP → All
Hardware: PC → All
Are you talking about exposing this to webpages, or is this an internal (unscriptable) thing?
Comment 4•20 years ago
|
||
(In reply to comment #3)
> Are you talking about exposing this to webpages, or is this an internal
> (unscriptable) thing?
>
http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html#Events-Event
Event::timeStamp.
The problem is that when an event is dispatched using (for example) nsEvent,
the time stamp is not usually updated, but the default value 0 is used.
When a nsDOMEvent is created and dispatched, the timestamp is set to PR_Now().
Updated•17 years ago
|
Comment 5•11 years ago
|
||
A similar search on MXR doesn't find anything: http://mxr.mozilla.org/mozilla-central/search?string=nsevent%20event
Can it be updated or should this bug be closed?
| Reporter | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
Updated•9 years ago
|
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Updated•7 years ago
|
Priority: -- → P5
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•