File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
packages/browser-utils/src/metrics/web-vitals Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 22
33> A modular library for measuring the [ Web Vitals] ( https://web.dev/vitals/ ) metrics on real users.
44
5- This was vendored from: https://github.com/GoogleChrome/web-vitals : v5.0.2
5+ This was vendored from: https://github.com/GoogleChrome/web-vitals : v5.0.3
66
77The commit SHA used is:
8- [ 463abbd425cda01ed65e0b5d18be9f559fe446cb ] ( https://github.com/GoogleChrome/web-vitals/tree/463abbd425cda01ed65e0b5d18be9f559fe446cb )
8+ [ e22d23b22c1440e69c5fc25a2f373b1a425cc940 ] ( https://github.com/GoogleChrome/web-vitals/tree/e22d23b22c1440e69c5fc25a2f373b1a425cc940 )
99
1010Current vendored web vitals are:
1111
Original file line number Diff line number Diff line change @@ -32,7 +32,12 @@ export const whenIdleOrHidden = (cb: () => void) => {
3232 } else {
3333 // eslint-disable-next-line no-param-reassign
3434 cb = runOnce ( cb ) ;
35- rIC ( cb ) ;
35+ rIC ( ( ) => {
36+ cb ( ) ;
37+ // Remove the above event listener since no longer required.
38+ // See: https://github.com/GoogleChrome/web-vitals/issues/622
39+ WINDOW . document ?. removeEventListener ( 'visibilitychange' , cb ) ;
40+ } ) ;
3641 // sentry: we use onHidden instead of directly listening to visibilitychange
3742 // because some browsers we still support (Safari <14.4) don't fully support
3843 // `visibilitychange` or have known bugs w.r.t the `visibilitychange` event.
You can’t perform that action at this time.
0 commit comments