mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00

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.
14 lines
341 B
HTML
14 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>
|