Node.js version
v24.8.0
jsdom version
27.3.0
Minimal reproduction case
const { JSDOM } = require("jsdom");
const options = {};
const dom = new JSDOM(`
<!DOCTYPE html>
<html>
<head>
<style>
@layer x { .a { @media all { @media all { color: red } } } }
</style>
</head>
<body></body>
</html>
`, options);
console.log("PASS");
How does similar code behave in browsers?
This CSS is valid and works in all modern browsers.
What is the problem?
I expected this to parse successfully, like it does in browsers and in jsdom 27.2.0. Instead, it crashes with RangeError: Maximum call stack size exceeded in jsdom 27.3.0.
The issue is in the upstream dependency @acemir/cssom which was upgraded from ^0.9.23 to ^0.9.28 in jsdom 27.3.0. Filed: acemir/CSSOM#76
Node.js version
v24.8.0
jsdom version
27.3.0
Minimal reproduction case
How does similar code behave in browsers?
This CSS is valid and works in all modern browsers.
What is the problem?
I expected this to parse successfully, like it does in browsers and in jsdom
27.2.0. Instead, it crashes withRangeError: Maximum call stack size exceededin jsdom27.3.0.The issue is in the upstream dependency
@acemir/cssomwhich was upgraded from^0.9.23to^0.9.28in jsdom27.3.0. Filed: acemir/CSSOM#76