Skip to content

:scope no longer works #1620

@yukulele

Description

@yukulele

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions