We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bf45a5 commit 013b9a9Copy full SHA for 013b9a9
packages/browser-utils/src/metrics/web-vitals/lib/getVisibilityWatcher.ts
@@ -61,7 +61,11 @@ const onVisibilityUpdate = (event: Event) => {
61
}
62
};
63
64
-export const getVisibilityWatcher = () => {
+export const getVisibilityWatcher = (reset = false) => {
65
+ if (reset) {
66
+ firstHiddenTime = Infinity;
67
+ }
68
+
69
if (WINDOW.document && firstHiddenTime < 0) {
70
// Check if we have a previous hidden `visibility-state` performance entry.
71
const activationStart = getActivationStart();
0 commit comments