Skip to content

Commit 27db8a0

Browse files
authored
Readme fixes for INP (#379)
* Clarify INP callbacks on README * Add CLS back in
1 parent a948d3c commit 27db8a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,12 @@ Note that some of these metrics will not report until the user has interacted wi
253253

254254
Also, in some cases a metric callback may never be called:
255255

256-
- FID is not reported if the user never interacts with the page.
256+
- FID and INP are not reported if the user never interacts with the page.
257257
- CLS, FCP, FID, and LCP are not reported if the page was loaded in the background.
258258

259259
In other cases, a metric callback may be called more than once:
260260

261-
- CLS should be reported any time the [page's `visibilityState` changes to hidden](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden).
261+
- CLS and INP should be reported any time the [page's `visibilityState` changes to hidden](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden).
262262
- All metrics are reported again (with the above exceptions) after a page is restored from the [back/forward cache](https://web.dev/bfcache/).
263263

264264
_**Warning:** do not call any of the Web Vitals functions (e.g. `onCLS()`, `onFID()`, `onLCP()`) more than once per page load. Each of these functions creates a `PerformanceObserver` instance and registers event listeners for the lifetime of the page. While the overhead of calling these functions once is negligible, calling them repeatedly on the same page may eventually result in a memory leak._

0 commit comments

Comments
 (0)