mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibWeb: Improve HTMLOptionElement spec compliance
Implement ask_for_a_reset() function
This commit is contained in:
parent
f4102b1dc9
commit
9d4f3c938f
Notes:
github-actions[bot]
2024-07-26 08:16:45 +00:00
Author: https://github.com/TSultanov Commit: https://github.com/LadybirdBrowser/ladybird/commit/9d4f3c938fd Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/832 Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 4 additions and 1 deletions
|
@ -137,7 +137,10 @@ int HTMLOptionElement::index() const
|
|||
// https://html.spec.whatwg.org/multipage/form-elements.html#ask-for-a-reset
|
||||
void HTMLOptionElement::ask_for_a_reset()
|
||||
{
|
||||
// FIXME: Implement this operation.
|
||||
// If an option element in the list of options asks for a reset, then run that select element's selectedness setting algorithm.
|
||||
if (is<HTMLSelectElement>(parent_element())) {
|
||||
static_cast<HTMLSelectElement*>(parent())->update_selectedness();
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#concept-option-disabled
|
||||
|
|
Loading…
Reference in a new issue