Re: [csswg-drafts] How to handle addEventListener on `CSSPseudoElement`? (#12163)

So, the last time we almost resolved to add `.pseudoTarget` part. Which sounds like a good first step which is safe, useful and web-compatable.

Since then I've discussed with @annevk some spec details.

The first one being:
We don't need `.pseudoTarget` on general `Event`, instead, we only need a limited list of events.
I suggest we start with `AnimationEvent` (and maybe replacing `pseudoElement` from it), `TransitionEvent`, `FocusEvent`, `PointerEvent`, `MouseEvent`, `KeyboardEvent`, `TouchEvent` and add if needed (or more general `UIEvent` instead of individual ones that I've listed).

The second one being:
Try to mention/specify in some form how to initialize that `.pseudoTarget` property. Maybe try to mention something in hit testing part remembering pseudo-element it hit while retargeting it to its ultimate originating element.

So, I hope this time we can resolve on `.pseudoTarget` part and discuss the two points.

-- 
GitHub Notification of comment by danielsakhapov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12163#issuecomment-3467701879 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 30 October 2025 12:13:44 UTC