Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for :has() pseudo-class #72

Closed
KittyGiraudel opened this issue Jan 21, 2023 · 5 comments
Closed

Missing support for :has() pseudo-class #72

KittyGiraudel opened this issue Jan 21, 2023 · 5 comments

Comments

@KittyGiraudel
Copy link

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.

@bramus
Copy link

bramus commented Jan 21, 2023

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.

@KittyGiraudel
Copy link
Author

Ah, right. I forgot about this. Thank you Bramus. :)

@LyzioOh
Copy link

LyzioOh commented Mar 31, 2023

Hi, are PR welcome ?

@dperini
Copy link
Owner

dperini commented Mar 31, 2023

@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.

@dperini
Copy link
Owner

dperini commented Apr 6, 2023

@KittyGiraudel
there are still no plans to implement the :has() pseudo-class
so I am closing this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants