mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +00:00
LibWeb: Keep track of the order in which option elements are selected
This allows us to locate the most-recently-selected when running the selectedness update algorithm.
This commit is contained in:
parent
581597cb34
commit
dc9179bb1b
Notes:
github-actions[bot]
2024-11-14 22:07:21 +00:00
Author: https://github.com/awesomekling
Commit: dc9179bb1b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2348
10 changed files with 107 additions and 27 deletions
|
@ -77,7 +77,7 @@ JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Object>> OptionConstructor::construct
|
|||
}
|
||||
|
||||
// 6. If selected is true, then set option's selectedness to true; otherwise set its selectedness to false (even if defaultSelected is true).
|
||||
option_element->m_selected = vm.argument(3).to_boolean();
|
||||
option_element->set_selected_internal(vm.argument(3).to_boolean());
|
||||
|
||||
// 7. Return option.
|
||||
return option_element;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue