Skip to content

Commit 9e42fc0

Browse files
committed
bring back first-input listener for our INP augmentation
1 parent 6eb8398 commit 9e42fc0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

packages/browser-utils/src/metrics/inp.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,5 @@ export function registerInpInteractionListener(): void {
182182
};
183183

184184
addPerformanceInstrumentationHandler('event', handleEntries);
185+
addPerformanceInstrumentationHandler('first-input', handleEntries);
185186
}

packages/browser-utils/src/metrics/instrument.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ import { onLCP } from './web-vitals/getLCP';
66
import { observe } from './web-vitals/lib/observe';
77
import { onTTFB } from './web-vitals/onTTFB';
88

9-
type InstrumentHandlerTypePerformanceObserver = 'longtask' | 'event' | 'navigation' | 'paint' | 'resource' | 'element';
9+
type InstrumentHandlerTypePerformanceObserver =
10+
| 'longtask'
11+
| 'event'
12+
| 'navigation'
13+
| 'paint'
14+
| 'resource'
15+
| 'element'
16+
// fist-input is still needed for INP
17+
| 'first-input';
1018

1119
type InstrumentHandlerTypeMetric = 'cls' | 'lcp' | 'ttfb' | 'inp';
1220

0 commit comments

Comments
 (0)