mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 23:27:42 +00:00

The loop that was supposed to check the chain of previous or next siblings had a logic mistake where it would never traverse the chain, so we would get stuck looking at the immediate sibling forever.
13 lines
423 B
HTML
13 lines
423 B
HTML
<script src="../include.js"></script>
|
|
<div id="one"></div><div id="two"></div><script>
|
|
test(() => {
|
|
let one = document.getElementById("one");
|
|
let two = document.getElementById("two");
|
|
two.before(one);
|
|
printElement(one);
|
|
printElement(one.nextSibling);
|
|
printElement(two);
|
|
printElement(two.previousSibling);
|
|
println("PASS (didn't crash)");
|
|
});
|
|
</script>
|