-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
getComputedStyle performance #3234
Copy link
Copy link
Closed
Description
Basic info:
- Node.js version: n/a
- jsdom version: any version is affected
Minimal reproduction case
const div = document.createElement('div');
document.body.appendChild(div);
console.time('getComputedStyle');
getComputedStyle(div);
console.timeEnd('getComputedStyle');How does similar code behave in browsers?
This code take a fraction of millisecond in real browsers, but 100 times slower in JSDOM. There are some libraries in the ecosystem heavily relying on this API and the tests become slow because of that.
Related issues:
testing-library/dom-testing-library#820
theKashey/react-focus-lock#151
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels