Open aralroca opened 3 months ago
Describe the bug
const sheet = new CSSStyleSheet(); sheet.insertRule("div { color: red; }"); document.adoptedStyleSheets = [sheet];
Modifies the document.styleSheets, but in the tests with happy-dom, this is not reflected.
document.styleSheets
To Reproduce
Just run:
const sheet = new CSSStyleSheet(); sheet.insertRule("div { color: red; }"); document.adoptedStyleSheets = [sheet]; expect(document.styleSheets).not.toBeEmpty()
Expected behavior
The document.styleSheets should be updated according the the changes with document.adoptedStyleSheets.
document.adoptedStyleSheets
Describe the bug
Modifies the
document.styleSheets
, but in the tests with happy-dom, this is not reflected.To Reproduce
Just run:
Expected behavior
The
document.styleSheets
should be updated according the the changes withdocument.adoptedStyleSheets
.