Closed
Bug 1401406
Opened 8 years ago
Closed 5 years ago
Different MDN docs claim contradictory definitions about performance.timeOrigin
Categories
(Developer Documentation Graveyard :: API: Miscellaneous, enhancement)
Developer Documentation Graveyard
API: Miscellaneous
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: dmosedale, Assigned: cmills)
Details
https://developer.mozilla.org/en-US/docs/Web/API/Performance/now
describes it as
"the time origin (the PerformanceTiming.navigationStart property)."
The DOMHighResTimeStamp page, has a [much more complex definition](https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp#The_time_origin).
This makes using performance.timeOrigin in JavaScript code for some things difficult.
I'm guessing that this conflict is because the W3C standards changed over time.
It would helpful to know which versions of Firefox have which implementations (assuming one of them isn't just wrong).
| Reporter | ||
Comment 1•8 years ago
|
||
Excitingly, there seem to be two different usages in the tree:
http://searchfox.org/mozilla-central/source/dom/performance/PerformanceService.cpp#33
http://searchfox.org/mozilla-central/source/dom/base/nsDOMNavigationTiming.h#117
meaning that it's at least conceivable that both of those documents are sort-of right.
| Reporter | ||
Comment 2•8 years ago
|
||
(Except for the part where they're inconsistent with each other, I think).
| Reporter | ||
Comment 3•8 years ago
|
||
Just poking at the web console on a random web page, evidence would seem to suggest that at least for one case, it's not as simple as the performance.now() MDN page claims, as here we see different timeOrigin and navigationStart properties:
> performance
Performance { timeOrigin: 1505861544822.1272, ... }
> performance.timing
PerformanceTiming { navigationStart: 1505865402719, ... }
| Reporter | ||
Comment 4•8 years ago
|
||
That last test was on Nightly 57.0a1 (2017-09-19) (64-bit) on Mac.
| Assignee | ||
Comment 5•8 years ago
|
||
Hi Dan,
Thanks for bringing this up. I've had a read of the specs, and it looks like the origin time definition here is correct:
https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResTimeStamp#The_time_origin
But I wasn't satisfied with the definition at the other document (e.g. time origin isn't just the same as navigationStart). So I've updated it to just point to the one I think is correct - see it now:
https://developer.mozilla.org/en-US/docs/Web/API/Performance/now
Do you think this fixes the problem, or do you think more needs to be done?
Assignee: nobody → cmills
| Assignee | ||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Comment 6•5 years ago
|
||
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•