ladybird/Tests/LibWeb/Text/input/HTML/set-innerHTML-textarea.html
Timothy Flynn ff48b7333c LibWeb: Remove shadow roots from elements that are removed from the DOM
We currently create a shadow tree once for each DOM element that renders
with a shadow tree (e.g. <input>, <details>). If such an element is
removed from the DOM, we must remove its shadow tree. Otherwise, the
shadow tree will refer to the old document in perpetuity.

If the node is added back to a DOM, then recreate the shadow tree.
2023-11-30 08:49:15 +00:00

9 lines
246 B
HTML

<div id=test></div>
<script src="../include.js"></script>
<script>
test(() => {
let element = document.getElementById('test');
element.innerHTML = "<textarea></textarea>";
println(element.innerHTML);
});
</script>