Re: [csswg-drafts] [css-contain] Similar to window.matchMedia(), Container Queries should have a similar method (#6205)

I just ran into a case where I'd like to watch changes to a css variable using [container style queries](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_size_and_style_queries#container_style_queries_2):

```javascript
const match = document.body.matchContainer( 'style( --theme: dark )' );
match.addEventListener( () => { /* .... */ } );
```

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


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

Received on Wednesday, 5 June 2024 04:59:17 UTC