Re: [csswg-drafts] Proposal: Allow Custom Event Names in `pointer-events` for CSS Pseudo-elements (#11527)

This is solved by [`.pseudo()`](https://drafts.csswg.org/css-pseudo-4/#window-interface), allowing you to attach event listeners directly onto the pseudo.

```js
document.querySelector('#box').pseudo('after').addEventListener('click', cb);
```

_(But no browser has this implemented, unfortunately)_

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


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

Received on Tuesday, 21 January 2025 11:21:09 UTC