Skip to content

Commit

Permalink
Update documentation in README
Browse files Browse the repository at this point in the history
  • Loading branch information
philipwalton committed Nov 16, 2022
1 parent e03e92e commit 3e1d51c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
15 changes: 8 additions & 7 deletions README.md
Expand Up @@ -694,14 +694,15 @@ interface Metric {
entries: (PerformanceEntry | LayoutShift | FirstInputPolyfillEntry | NavigationTimingPolyfillEntry)[];

/**
* The type of navigation
* The type of navigation.
*
* Navigation Timing API (or `undefined` if the browser doesn't
* support that API).
* For pages that are restored from the bfcache, this value will
* be 'back-forward-cache'.
* For pages that are restored after being discarded, this value will
* be 'restore'.
* This will be the value returned by the Navigation Timing API (or
* `undefined` if the browser doesn't support that API), with the following
* exceptions:
* - 'back-forward-cache': for pages that are restored from the bfcache.
* - 'prerender': for pages that were prerendered.
* - 'restore': for pages that were discarded by the browser and then
* restored by the user.
*/
navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender' | 'restore';
}
Expand Down
12 changes: 8 additions & 4 deletions src/types/base.ts
Expand Up @@ -59,11 +59,15 @@ export interface Metric {
entries: (PerformanceEntry | LayoutShift | FirstInputPolyfillEntry | NavigationTimingPolyfillEntry)[];

/**
* The type of navigation
* The type of navigation.
*
* Navigation Timing API (or `undefined` if the browser doesn't
* support that API). For pages that are restored from the bfcache, this
* value will be 'back-forward-cache'.
* This will be the value returned by the Navigation Timing API (or
* `undefined` if the browser doesn't support that API), with the following
* exceptions:
* - 'back-forward-cache': for pages that are restored from the bfcache.
* - 'prerender': for pages that were prerendered.
* - 'restore': for pages that were discarded by the browser and then
* restored by the user.
*/
navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender' | 'restore';
}
Expand Down

0 comments on commit 3e1d51c

Please sign in to comment.