mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Ensure enumerated attributes are always limited to known values
Previously, the invalid value default wasn't taken into account when determining the value that should be returned from the getter of an enumerated attribute. This caused a crash when an enumerated attribute of type DOMString? was set to an invalid value.
This commit is contained in:
parent
576bc0e55b
commit
158d9a5921
Notes:
sideshowbarker
2024-07-17 10:16:43 +09:00
Author: https://github.com/tcl3
Commit: 158d9a5921
Pull-request: https://github.com/SerenityOS/serenity/pull/23670
3 changed files with 64 additions and 21 deletions
|
@ -5,6 +5,10 @@
|
|||
println(button.type);
|
||||
button.setAttribute("type", "button");
|
||||
println(button.type);
|
||||
button.setAttribute("type", "BUTTON");
|
||||
println(button.type);
|
||||
button.setAttribute("type", "invalid");
|
||||
println(button.type);
|
||||
button.removeAttribute("type");
|
||||
println(button.type);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue