← Back to release summary

Pseudo target on events

Category
CSS
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

Specific events are now extended to have `.pseudoTarget` that is either CSSPseudoElement (if interaction has been with pseudo-element) or null. This allows to have more specific information on the event origin, e.g. that not just an ultimate originating element (Event.target) has been clicked, but more specifically that it was ::after. Note that the Event.target is unchanged so event only has extra info on pseudo-element interaction. The events are UIEvent, AnimationEvent, TransitionEvent. mouseover, mouseout, mouseenter, mouseleave and their pointer* counterparts are not yet supported.

Standards & signals

View on chromestatus.com