diff --git a/src/onLCP.ts b/src/onLCP.ts index 9dbd79af..57f0a856 100644 --- a/src/onLCP.ts +++ b/src/onLCP.ts @@ -104,7 +104,10 @@ export const onLCP = ( // Wrap in a setTimeout so the callback is run in a separate task // to avoid extending the keyboard/click handler to reduce INP impact // https://github.com/GoogleChrome/web-vitals/issues/383 - addEventListener(type, () => whenIdle(stopListening), true); + addEventListener(type, () => whenIdle(stopListening), { + once: true, + capture: true, + }); }); onHidden(stopListening);