mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02: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:
committed by
Andreas Kling
parent
521a1be97f
commit
2227674b91
Notes:
sideshowbarker
2024-07-17 08:55:54 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/2227674b91 Pull-request: https://github.com/SerenityOS/serenity/pull/23687 Reviewed-by: https://github.com/awesomekling
@@ -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>
|
||||
Reference in New Issue
Block a user