LibWeb: Implement setRangeText for input and textarea elements

This method replaces range of text in its respective element with a new
string
This commit is contained in:
Tim Ledbetter 2024-08-30 17:22:58 +01:00 committed by Andreas Kling
parent 206262cd55
commit 2f5b070716
Notes: github-actions[bot] 2024-08-31 09:50:48 +00:00
10 changed files with 217 additions and 4 deletions

View file

@ -205,6 +205,13 @@ String HTMLTextAreaElement::api_value() const
return *m_api_value;
}
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-textarea/input-relevant-value
WebIDL::ExceptionOr<void> HTMLTextAreaElement::set_relevant_value(String const& value)
{
set_value(value);
return {};
}
// https://html.spec.whatwg.org/multipage/form-elements.html#dom-textarea-textlength
u32 HTMLTextAreaElement::text_length() const
{