mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
LibWeb: Implement the form-control willValidate property
This change — part of the HTML constraint-validation API (aka “client-side form validation”) — implements the willValidate IDL/DOM attribute/property for all form controls that support it.
This commit is contained in:
committed by
Tim Ledbetter
parent
7da5869b14
commit
e79319ad85
Notes:
github-actions[bot]
2025-02-26 05:46:05 +00:00
Author: https://github.com/sideshowbarker Commit: https://github.com/LadybirdBrowser/ladybird/commit/e79319ad85d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3690 Reviewed-by: https://github.com/tcl3 ✅
@@ -695,6 +695,13 @@ void HTMLSelectElement::update_selectedness()
|
||||
update_inner_text_element();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-willvalidate
|
||||
bool HTMLSelectElement::will_validate()
|
||||
{
|
||||
// The willValidate attribute's getter must return true, if this element is a candidate for constraint validation
|
||||
return is_candidate_for_constraint_validation();
|
||||
}
|
||||
|
||||
bool HTMLSelectElement::is_focusable() const
|
||||
{
|
||||
return enabled();
|
||||
|
||||
Reference in New Issue
Block a user