Re: [csswg-drafts] [css-conditional] Make CSSSupportsRule expose whether its condition is met (#4240)

While looking into this, I realized that `CSSMediaRule.matches` isn't _quite_ easy either... A media rule might be disconnected from a document, accessed from another document, etc.

So at least we need to define what document we match against. The incumbent (caller) document? The document that the media rule is on, if any?

So that at least needs a spec clarification + test (easiest way to test this would be a same-origin iframe calling into `CSSMediaRule.matches` on a stylesheet originally from the parent document or vice-versa).

@tabatkins thoughts?


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


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

Received on Monday, 1 August 2022 21:50:48 UTC