This PR adds logic to keep track of content by using a pair of (element, request) to identify content and using a map to retain the needed information to populate an LCP entry. The PR adds logic to properly update the largest content when an element is removed from the page. It is missing logic to update when an image is removed but the element is not (src change, background image removal, etc.), and this can be done in a followup. Adding myself as editor as this is a pretty substantial change.
This PR adds logic to keep track of content by using a pair of (element, request) to identify content and using a map to retain the needed information to populate an LCP entry. The PR adds logic to properly update the largest content when an element is removed from the page. It is missing logic to update when an image is removed but the element is not (src change, background image removal, etc.), and this can be done in a followup. Adding myself as editor as this is a pretty substantial change.
Preview | Diff