Re: [csswg-drafts] [css-pseudo] Add a property to the `CSSPseudoElement` IDL interface to determine if a pseudo element "exists" (#12158)

The CSS Working Group just discussed `break`.

<details><summary>The full IRC log of that discussion</summary>
&lt;astearns> topic: break<br>
&lt;kbabbitt> scribenick: kbabbitt<br>
&lt;kbabbitt> github: https://github.com/w3c/csswg-drafts/issues/12158<br>
&lt;kbabbitt> sakhapov: coming back to CSSPseudoELement object<br>
&lt;kbabbitt> ... it's a proxy for an element<br>
&lt;kbabbitt> ... but element can exist or not exist<br>
&lt;kbabbitt> ... and what it means depends on what we discussed<br>
&lt;kbabbitt> ... for :after it can mean rendered, for :selection it can mean something's selected<br>
&lt;kbabbitt> ... sometimes we need to know if the thing exists<br>
&lt;kbabbitt> ... 2 approaches suggested: synchronous exists property<br>
&lt;kbabbitt> ... second suggestion by noam, pseudo element observer<br>
&lt;kbabbitt> ... which is a synchronous way<br>
&lt;ntim> q+<br>
&lt;kbabbitt> ... tells you which were added and which were removed<br>
&lt;astearns> ack florian<br>
&lt;kbabbitt> ... can use this to add event listeners<br>
&lt;kbabbitt> ... most use cases I can think of right now are covered by observer<br>
&lt;kbabbitt> ... for example if you think about scroll markers, you might want stats on which scroll marker has been clicked<br>
&lt;kbabbitt> ... observer is better for this case becaues it tells you scroll marker has been created<br>
&lt;kbabbitt> ... I also think there are possible use cases for sync .exists property<br>
&lt;kbabbitt> ... which I listed in 2nd to last comment in issue<br>
&lt;kbabbitt> ... first is, might want another event listener which checks existense of pseudo<br>
&lt;kbabbitt> ... might want sync approach<br>
&lt;kbabbitt> ... also, point is that observer probably is not suitable for non tree abiding pseudos<br>
&lt;kbabbitt> ... those are more like states than nodes<br>
&lt;kbabbitt> ... also some libraries if you use them might want to init first with knowledge of sync existence of pseudos<br>
&lt;kbabbitt> ... those use cases for now are more theoretical<br>
&lt;kbabbitt> ... but I think they can be things we might need in the future<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12158#issuecomment-3531338437 using your GitHub account


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

Received on Friday, 14 November 2025 07:37:10 UTC