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 a navigationType property to the Metric object #219

Merged
merged 1 commit into from Apr 25, 2022

Conversation

philipwalton
Copy link
Member

Fixes #214.

This PR adds the navigationType property to the Metric object as sets its value based on the following logic:

  • If the page was loaded via a normal navigation and the browser supports the Navigation Timing API, the type value from the navigation entry is used.
  • If the page was loaded via a normal navigation but the browser does not support the Navigation Timing API, the value will be undefined.
  • If the page was restored from the bfcache, this value will be 'back_forward_cache' (not to be confused with a value of 'back_forward' from the Navigation Timing API after a normal back/forward navigation).

Note: In the future, this property could potentially include other values, e.g. a soft navigation in an single-page application, but currently only the above are supported.

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

Successfully merging this pull request may close these issues.

None yet

1 participant