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

Child combinator and :has() pseudo class doesn't work together #1642

Closed
uitest93 opened this issue Dec 24, 2024 · 1 comment · Fixed by #1660
Closed

Child combinator and :has() pseudo class doesn't work together #1642

uitest93 opened this issue Dec 24, 2024 · 1 comment · Fixed by #1660
Assignees
Labels
bug Something isn't working

Comments

@uitest93
Copy link

Describe the bug

Using > with :has selector doesn't work in happy-dom

To Reproduce

const { Window } = require('happy-dom');

const window = new Window();
const document = window.document;

const container = document.createElement('div');
container.innerHTML = `
  <span><video attr="value1"></video></span>
  <span><b><video></video></b></span>
`;
console.log(Array.from(container.querySelectorAll('span:has(> video)')));

Expected behavior
It should return single element.

@capricorn86
Copy link
Owner

Thank you for reporting @uitest93! 🙂

This should be fixed now in v16.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants