Bug 250331 - Add navigationId to PerformanceEntry and subclasses
Summary: Add navigationId to PerformanceEntry and subclasses
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-09 11:35 PST by Ian Clelland
Modified: 2023-01-16 11:36 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Clelland 2023-01-09 11:35:29 PST
(Presuming that https://github.com/w3c/performance-timeline/pull/192 and the related HTML change https://github.com/whatwg/html/pull/7370 land)

PerformanceEntry obejcts (https://w3c.github.io/performance-timeline/#the-performanceentry-interface) should track the number of times that a loaded document has appeared to the user to navigate. Initially this is a count of back-forward cache restorations, which are indistinguishable to the user from other history navigations. The intention is to extend this to include single-page-app (SPA) transitions which mimic traditional navigations (see https://github.com/WICG/soft-navigations), with other extensions possible in the future.

The overall change here is that PerformanceEntry's IDL becomes

      interface PerformanceEntry {
        readonly    attribute DOMString           name;
        readonly    attribute DOMString           entryType;
        readonly    attribute DOMHighResTimeStamp startTime;
        readonly    attribute DOMHighResTimeStamp duration;
        readonly    attribute unsigned long       navigationId;
        [Default] object toJSON();
      };

where navigationId is set to the value of a similar counter on the document where the entry originated. This counter starts at 1 for the initial (network) navigation, and is incremented by back-forward-cache restoration events (and in the future by detected SPA navigations)
Comment 1 Radar WebKit Bug Importer 2023-01-16 11:36:16 PST
<rdar://problem/104303481>