Closed KittyGiraudel closed 1 year ago
Correction: :has()
does not accept a <forgiving-relative-selector-list>
. It was initially specced that way but this is no longer the case as per CSS WG Resolution
See the latest editors draft of the spec for an updated definition.
Ah, right. I forgot about this. Thank you Bramus. :)
Hi, are PR welcome ?
@LyzioOh Yes they are much appreciated. If related to bugs remember to include a small reproducible code showing how/when the bug happen. In case of requests for new functionalities they will be discussed with jsdom maintainers. For the remaining cases CSS Selector Level 4 is the target reference spec.
@KittyGiraudel there are still no plans to implement the :has() pseudo-class so I am closing this issue for now.
Support for the
:has()
pseudo-class is getting very good with only Firefox lacking support for wide adoption.As far as I can tell from the wiki, it seems like nwsapi does not support
:has()
yet? In turns, this makes JSDOM throwing errors when using a selector containing the:has()
pseudo-class — which is not ideal.I think the implementation should be relatively similar to the
:is()
and:not()
pseudo-classes? Judging by the spec, that is. What’s nice (I think?) about this pseudo-class is that it accepts a<forgiving-relative-selector-list>
which means the validation of the argument doesn’t have to be strict.