mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
LibWeb: Correct logic for removing end nodes from HTMLOptionsCollection
This test case would previously crash. Found with domato.
This commit is contained in:
committed by
Tim Ledbetter
parent
f61e54b10c
commit
0cec68ea99
Notes:
github-actions[bot]
2024-07-27 19:24:14 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/0cec68ea996 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/865 Reviewed-by: https://github.com/tcl3 ✅
12
Tests/LibWeb/Text/input/DOM/HTMLSelectElement-length.html
Normal file
12
Tests/LibWeb/Text/input/DOM/HTMLSelectElement-length.html
Normal 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>
|
||||
Reference in New Issue
Block a user