Unlike all of the other metrics, for INP there is not a simple 1-to-1 relationship between the element selector in the attribution object, and the element itself in the entries array. This means that, if the selector is not sufficient and you need access to the element itself, it's not possible to get it without re-implementing all of the INP attribution logic, which is non-trivial for INP.
To address this, this PR adds an interactionTargetElement property to the INPAttribution object, which corresponds to the element identified via the interactionTarget property.
Fixes #456.
Unlike all of the other metrics, for INP there is not a simple 1-to-1 relationship between the element selector in the attribution object, and the element itself in the
entries
array. This means that, if the selector is not sufficient and you need access to the element itself, it's not possible to get it without re-implementing all of the INP attribution logic, which is non-trivial for INP.To address this, this PR adds an
interactionTargetElement
property to theINPAttribution
object, which corresponds to the element identified via theinteractionTarget
property.