mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibWeb: Don't crash when updating a select with detached option elements
`Node::shadow_including_root()` was missing a null check, which caused a crash when manipulating a select element, whose option elements were initially detached.
This commit is contained in:
parent
521a1be97f
commit
2227674b91
Notes:
sideshowbarker
2024-07-17 08:55:54 +09:00
Author: https://github.com/tcl3
Commit: 2227674b91
Pull-request: https://github.com/SerenityOS/serenity/pull/23687
Reviewed-by: https://github.com/awesomekling
3 changed files with 18 additions and 2 deletions
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<select></select>
|
||||
<script>
|
||||
test(() => {
|
||||
const selectElement = document.querySelector("select");
|
||||
const optionElement = document.createElement("option");
|
||||
optionElement.innerHTML = "option text"
|
||||
selectElement.appendChild(optionElement);
|
||||
document.body.removeChild(selectElement);
|
||||
println("PASS (didn't crash)");
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue