mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 14:40:18 +00:00
LibWeb: Unify report_validity for form associated elements
This function was implemented in a few classes but is a common element in all form associated elements and the functionality should be there. With these minimal changes we get to implement 4 idl functions for free.
This commit is contained in:
parent
46b1466998
commit
44053ed3c2
Notes:
github-actions[bot]
2025-08-29 18:29:11 +00:00
Author: https://github.com/tete17
Commit: 44053ed3c2
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6024
Reviewed-by: https://github.com/tcl3 ✅
12 changed files with 14 additions and 25 deletions
|
@ -237,6 +237,13 @@ WebIDL::ExceptionOr<void> FormAssociatedElement::set_form_action(String const& v
|
|||
return html_element.set_attribute(HTML::AttributeNames::formaction, value);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-reportvalidity
|
||||
bool FormAssociatedElement::report_validity()
|
||||
{
|
||||
// The reportValidity() method, when invoked, must run the report validity steps on this element.
|
||||
return report_validity_steps();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#check-validity-steps
|
||||
bool FormAssociatedElement::check_validity_steps()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue