-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
has to-upstream testThis bug has a failing to-upstream web platform test waiting to be fixedThis bug has a failing to-upstream web platform test waiting to be fixedmetr upliftA candidate for the METR Uplift experimentA candidate for the METR Uplift experimentselectorsCSS Selectors supportCSS Selectors support
Description
Basic info:
- Node.js version: 16.20.0
- jsdom version: 22.1.0
Minimal reproduction case
const { JSDOM } = require("jsdom");
const dom = new JSDOM('<div>hello</div>');
const element = dom.window.document.querySelector('div');
console.log('active', element.matches(':active'));
It logs active true
, but should log active false
. This behaves correctly in the browser.
edit: I first thought it was due to the update from 21 to 22, but it might not be related. Investigating further
edit2: After some digging, I found nwsapi 2.2.7 to be the culprit. The fix (a revert) seems to be already in the master branch, but it has not been released yet. I can locally override to 2.2.6 to make this work again. You might want to as well until the next version is released.
How does similar code behave in browsers?
mridgway, zuzusik and jshawl
Metadata
Metadata
Assignees
Labels
has to-upstream testThis bug has a failing to-upstream web platform test waiting to be fixedThis bug has a failing to-upstream web platform test waiting to be fixedmetr upliftA candidate for the METR Uplift experimentA candidate for the METR Uplift experimentselectorsCSS Selectors supportCSS Selectors support