Skip to content

:scope no longer works #1620

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

Open
yukulele opened this issue Nov 23, 2024 · 0 comments · May be fixed by #1771
Open

:scope no longer works #1620

yukulele opened this issue Nov 23, 2024 · 0 comments · May be fixed by #1771
Assignees
Labels
bug Something isn't working

Comments

@yukulele
Copy link

yukulele commented Nov 23, 2024

Describe the bug
since happy-dom@13, Element methods with selector string argument seem to no more support :scope selector

  • .queySelector()
  • .querySelectorAll()
  • .matches()

To Reproduce
Steps to reproduce the behavior:

  1. npm i happy-dom
  2. create this file:
//index.js
import { Window } from 'happy-dom';
const window = new Window();
console.log(window.document.body.matches(':scope')); // false :(
  1. node index.js

Expected behavior
element.matches(':scope') should be true

Device:

  • OS: linux
  • "Browser" happy-dem
  • Version @15.11.6
@yukulele yukulele added the bug Something isn't working label Nov 23, 2024
@yukulele yukulele changed the title :scope no more works :scope no longer works Nov 23, 2024
@capricorn86 capricorn86 self-assigned this Mar 10, 2025
@capricorn86 capricorn86 linked a pull request Mar 11, 2025 that will close this issue
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