Skip to content

Commit

Permalink
Specify "time origin" computation
Browse files Browse the repository at this point in the history
The time origin, which is the epoch for all performance timeline APIs, was previously defined in https://w3c.github.io/hr-time/#dfn-time-origin.

This makes its computation explicit, without changing its current definition and behavior. Notably:

* "time origin becomes an environment settings object algorithm, computed differently for windows vs. worker scopes.

* The 4 places where this timestamp is set are creation of an about:blank browsing context, the beginning of navigation, the confirmation of an unload prompt, and the creation of a worker.

* The timestamp is a "shared monotonic clock" value, which is defined in HR-TIME (and internally in ECMAScript).

As part of this PR, also refactored unload prompts to return a result rather than rely on a somewhat hand-wavy "refused to allow" property.

See w3c/hr-time#131 and w3c/navigation-timing#166. See also w3c/ServiceWorker#1621.
  • Loading branch information
noamr authored and Mason Freed committed Jun 3, 2022
1 parent c65d467 commit aecafc4
Showing 1 changed file with 134 additions and 52 deletions.
Loading

0 comments on commit aecafc4

Please sign in to comment.