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

Support relative selection inside a ":has" pseudo-class #133

Closed
johngeorgewright opened this issue Nov 14, 2024 · 1 comment
Closed

Support relative selection inside a ":has" pseudo-class #133

johngeorgewright opened this issue Nov 14, 2024 · 1 comment

Comments

@johngeorgewright
Copy link

johngeorgewright commented Nov 14, 2024

(Version 2.2.13)

The first example of :has, from the MDN website, uses relative selection. Trying to use this in a JSDOM/NWSAPI environment fails. Do you intend on supporting such a feature?

const { JSDOM } = require('jsdom')

const dom = new JSDOM(`<!DOCTYPE html><p>Hello world</p>`);

dom.window.document.querySelector('*:has(+ p)')
// Uncaught DOMException [SyntaxError]: '+p' is not a valid selector
@johngeorgewright
Copy link
Author

This is a duplicate of #123

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

1 participant