Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Browser navigation timing event #1919

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

martinkuba
Copy link
Contributor

Changes

This adds a new event for capturing the navigation timing date in browser/web applications.

Merge requirement checklist

@martinkuba martinkuba requested review from a team as code owners February 18, 2025 16:53
Copy link

github-actions bot commented Mar 6, 2025

This PR was marked stale due to lack of activity. It will be closed in 7 days.

@github-actions github-actions bot added the Stale label Mar 6, 2025
Copy link

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Mar 13, 2025
@trask trask reopened this Mar 13, 2025
@trask trask removed the Stale label Mar 13, 2025

This event describes the timing metrics of a page navigation as provided by the PerformanceNavigationTiming Performance API.

This event captures data from the [Navigation Timing API](https://www.w3.org/TR/navigation-timing-2/). It is recommended to be captured by using the PerformanceObserver API, or when the window load event fires. If the page starts unloading before the page loads, then the partial data can be captured by calling the [performance.getEntriesByType][https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByType] method.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This event captures data from the [Navigation Timing API](https://www.w3.org/TR/navigation-timing-2/). It is recommended to be captured by using the PerformanceObserver API, or when the window load event fires. If the page starts unloading before the page loads, then the partial data can be captured by calling the [performance.getEntriesByType][https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByType] method.
This event captures data from the [Navigation Timing API](https://www.w3.org/TR/navigation-timing-2/). It is recommended to be captured by using the PerformanceObserver API, or when the window load event fires. If the page starts unloading before the page loads, then the partial data can be captured by calling the [performance.getEntriesByType](https://developer.mozilla.org/en-US/docs/Web/API/Performance/getEntriesByType) method.

Comment on lines +71 to +74
brief: >
The time immediately before the user agent sets the document's
readyState to "complete". The value is relative to the start of the
navigation, and it is measured in milliseconds.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest moving the second sentence to the note (to make the brief shorter)

and maybe add links to the properties in each case, to be super explicit that these are defined externally, e.g. https://www.w3.org/TR/navigation-timing-2/#dom-performancenavigationtiming-domcomplete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants