You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Firefox 78, which supports the :is() selector, both queries result in two elements. Safari, for :matches(), and Chrome, for :-webkit-any(), give the same result.
I know things are still in flux in regards to the :is() and :where() pseudo-classes, but since the :matches() selector exists in JSDOM it is suprising behavior.
The text was updated successfully, but these errors were encountered:
danburzo
changed the title
:matches CSS selector does not match any elements
:matches() CSS pseudo-class does not match any elements in querySelectorAll()
Jul 21, 2020
I'm not sure what to do with this issue. Why do you think JSDOM supports :matches()? The intention is to only support standards, and :matches() is non-standard.
I initially expected it to work because it seemed to support a single selector (e.g. :matches(h2)) and it didn't complain matches was an unrecognized pseudo-class. I wasn't aware of the separate nwsapi project, that sounds like the right place to file an issue / feature request.
I guess we can close this issue, right? I can submit a PR once/if the feature makes it in nwsapi.
Basic info:
Minimal reproduction case
Runkit live demo
How does similar code behave in browsers?
In Firefox 78, which supports the
:is()
selector, both queries result in two elements. Safari, for:matches()
, and Chrome, for:-webkit-any()
, give the same result.I know things are still in flux in regards to the
:is()
and:where()
pseudo-classes, but since the:matches()
selector exists in JSDOM it is suprising behavior.The text was updated successfully, but these errors were encountered: