Open
Description
The browser module shows Web Vital metrics by default, but it doesn't let the user see which DOM element is responsible for the Largest Contentful Paint / First Contentful Paint metrics, which can be useful for debugging purposes.
One way to see that information is to use the web-vitals library via the addInitScript function, and use the libraries functions to find the largest element.
We can add an example of how to do that to both the addInitScript function page and the Using k6 browser section.