@@ -20,7 +20,7 @@ import { getVisibilityWatcher } from './lib/getVisibilityWatcher';
2020import { initMetric } from './lib/initMetric' ;
2121import { observe } from './lib/observe' ;
2222import { onHidden } from './lib/onHidden' ;
23- import { LCPMetric , ReportCallback , ReportOpts } from './types' ;
23+ import { LCPMetric , ReportCallback } from './types' ;
2424
2525const reportedMetricIDs : Record < string , boolean > = { } ;
2626
@@ -29,13 +29,8 @@ const reportedMetricIDs: Record<string, boolean> = {};
2929 * calls the `callback` function once the value is ready (along with the
3030 * relevant `largest-contentful-paint` performance entry used to determine the
3131 * value). The reported value is a `DOMHighResTimeStamp`.
32- *
33- * If the `reportAllChanges` configuration option is set to `true`, the
34- * `callback` function will be called any time a new `largest-contentful-paint`
35- * performance entry is dispatched, or once the final value of the metric has
36- * been determined.
3732 */
38- export const onLCP = ( onReport : ReportCallback , opts : ReportOpts = { } ) : void => {
33+ export const onLCP = ( onReport : ReportCallback ) : void => {
3934 const visibilityWatcher = getVisibilityWatcher ( ) ;
4035 const metric = initMetric ( 'LCP' ) ;
4136 let report : ReturnType < typeof bindReporter > ;
@@ -61,7 +56,7 @@ export const onLCP = (onReport: ReportCallback, opts: ReportOpts = {}): void =>
6156 const po = observe ( 'largest-contentful-paint' , handleEntries ) ;
6257
6358 if ( po ) {
64- report = bindReporter ( onReport , metric , opts . reportAllChanges ) ;
59+ report = bindReporter ( onReport , metric ) ;
6560
6661 const stopListening = ( ) : void => {
6762 if ( ! reportedMetricIDs [ metric . id ] ) {
0 commit comments