mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 04:13:11 +00:00
18a4455d43
After commit ff48b7333c
, we remove shadow
roots from elements that are removed from the DOM. Setting a node's
shadow root to null also sets that shadow root's host to null. Thus, the
comment in Node::is_shadow_including_descendant_of that assumes the host
is always non-null is not true.
The test added here would previously crash when interacting with a node
that is a descendant of a removed shadow root.
15 lines
341 B
HTML
15 lines
341 B
HTML
<div id=container>
|
|
<details open>
|
|
<summary>summary</summary>
|
|
<span id=node></span>
|
|
</details>
|
|
</div>
|
|
<script type="text/javascript">
|
|
let node = document.getElementById("node");
|
|
|
|
let container = document.getElementById("container");
|
|
container.innerHTML = "<span>Pass!</span>";
|
|
|
|
node.click();
|
|
</script>
|