LibWeb: Stub out a few HTMLTextArea validity IDL methods
These are invoked by GitHub when submitting a comment. Stub them out for now, as this is enough to let GitHub proceed with (attempting) to submit the comment.
This commit is contained in:
parent
76f767c867
commit
50d3f85f75
Notes:
sideshowbarker
2024-07-17 01:27:18 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/50d3f85f75 Pull-request: https://github.com/SerenityOS/serenity/pull/23496
3 changed files with 27 additions and 3 deletions
|
@ -148,6 +148,26 @@ u32 HTMLTextAreaElement::text_length() const
|
||||||
return Utf16View { utf16_data }.length_in_code_units();
|
return Utf16View { utf16_data }.length_in_code_units();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-checkvalidity
|
||||||
|
bool HTMLTextAreaElement::check_validity()
|
||||||
|
{
|
||||||
|
dbgln("(STUBBED) HTMLTextAreaElement::check_validity(). Called on: {}", debug_description());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-reportvalidity
|
||||||
|
bool HTMLTextAreaElement::report_validity()
|
||||||
|
{
|
||||||
|
dbgln("(STUBBED) HTMLTextAreaElement::report_validity(). Called on: {}", debug_description());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-cva-setcustomvalidity
|
||||||
|
void HTMLTextAreaElement::set_custom_validity(String const& error)
|
||||||
|
{
|
||||||
|
dbgln("(STUBBED) HTMLTextAreaElement::set_custom_validity(\"{}\"). Called on: {}", error, debug_description());
|
||||||
|
}
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/form-elements.html#dom-textarea-maxlength
|
// https://html.spec.whatwg.org/multipage/form-elements.html#dom-textarea-maxlength
|
||||||
WebIDL::Long HTMLTextAreaElement::max_length() const
|
WebIDL::Long HTMLTextAreaElement::max_length() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -79,6 +79,10 @@ public:
|
||||||
|
|
||||||
u32 text_length() const;
|
u32 text_length() const;
|
||||||
|
|
||||||
|
bool check_validity();
|
||||||
|
bool report_validity();
|
||||||
|
void set_custom_validity(String const& error);
|
||||||
|
|
||||||
WebIDL::Long max_length() const;
|
WebIDL::Long max_length() const;
|
||||||
WebIDL::ExceptionOr<void> set_max_length(WebIDL::Long);
|
WebIDL::ExceptionOr<void> set_max_length(WebIDL::Long);
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,9 @@ interface HTMLTextAreaElement : HTMLElement {
|
||||||
// FIXME: readonly attribute boolean willValidate;
|
// FIXME: readonly attribute boolean willValidate;
|
||||||
// FIXME: readonly attribute ValidityState validity;
|
// FIXME: readonly attribute ValidityState validity;
|
||||||
// FIXME: readonly attribute DOMString validationMessage;
|
// FIXME: readonly attribute DOMString validationMessage;
|
||||||
// FIXME: boolean checkValidity();
|
boolean checkValidity();
|
||||||
// FIXME: boolean reportValidity();
|
boolean reportValidity();
|
||||||
// FIXME: undefined setCustomValidity(DOMString error);
|
undefined setCustomValidity(DOMString error);
|
||||||
|
|
||||||
// FIXME: readonly attribute NodeList labels;
|
// FIXME: readonly attribute NodeList labels;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue