ladybird/Tests/LibWeb/Text/input/ShadowDOM/replace-declarative-shadow-root-with-style-sheet.html
Andreas Kling 8543b8ad6a LibWeb: Let style elements remember which StyleSheetList they live in
Instead of trying to locate the relevant StyleSheetList on style element
removal from the DOM, we now simply keep a pointer to the list instead.

This fixes an issue where using attachShadow() on an element that had
a declarative shadow DOM would cause any style elements present to use
the wrong StyleSheetList when removing themselves from the tree.
2024-09-21 08:56:01 +02:00

9 lines
284 B
HTML

<div id="hmmst"><template shadowrootmode="open"><div><style></style></div></template></div>
<script src="../include.js"></script>
<script>
test(() => {
hmmst.attachShadow({ mode: "open" });
println("PASS (didn't crash)");
hmmst.remove();
});
</script>