- From: Robert Flack via GitHub <noreply@w3.org>
- Date: Thu, 07 Aug 2025 15:14:06 +0000
- To: public-css-archive@w3.org
> .target would need to be the pseudoElement itself. That is how event dispatch works (except in the horrible very special case of some events dispatched to Window, where event.target is Document object. That is an ancient hackery which we tried to fix 20 years ago, but it was already too late. See the note in https://dom.spec.whatwg.org/#dispatching-events ) So I don't understand why we'd need .pseudoTarget. pseudoTarget is basically a more specific target. It is somewhat analogous to how with shadow dom the target of the event when it bubbles out of the shadow root is the shadow dom container rather than the specific target within the shadow dom - except in that case there is no access to the original target. The reason to add it is that if the event bubbles to ancestor elements providing a pseudo element interface instead of element will break existing sites. Leaving target the same as it always has been ensures that code which isn't pseudo element aware continues to work. -- GitHub Notification of comment by flackr Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12163#issuecomment-3164624372 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 7 August 2025 15:14:07 UTC