Closed pmeenan closed 2 years ago
looks good, I commented on your fork accidentally instead of here
@stoyan fixed most of the nits - only one I wasn't 100% confident in was going to the dotted notation for the event attributes in case some of the attributes were missing sometimes. Maybe that's not a valid concern or there's a better way to fail gracefully (if so, happy to make that change too).
Fix https://github.com/WPO-Foundation/wptagent/issues/564
Avoids iterating over every property of the elements and tripping feature usage flags.
This should also reduce the overhead of the injected script slightly and extracts everything the UI needs to do the LCP and CLS analysis.
The element timing and paint timing observers were not being used yet so leave those out until they are actually added to the output.