LibWeb: Correct logic for removing end nodes from HTMLOptionsCollection

This test case would previously crash.

Found with domato.
This commit is contained in:
Sam Atkins 2024-07-27 13:33:51 +01:00 committed by Tim Ledbetter
commit 0cec68ea99
Notes: github-actions[bot] 2024-07-27 19:24:14 +00:00
3 changed files with 17 additions and 2 deletions

View file

@ -0,0 +1,12 @@
<script src="../include.js"></script>
<script>
test(() => {
const select = document.createElement("select");
const option = document.createElement("option");
println(select.length);
select.add(option);
println(select.length);
select.length = 0;
println(select.length);
});
</script>