LibWeb: Deduplicate the firing of input events in HTMLInputElement

Input elements without a defined user-interaction behavior need to fire
an input event when the user changes the element's value in some way.
This change moves the code to do this into its own function and adds
some spec text to explain what is being done.
This commit is contained in:
Tim Ledbetter 2024-05-18 05:45:13 +01:00 committed by Andreas Kling
commit a3d12e569c
Notes: sideshowbarker 2024-07-17 03:05:16 +09:00
2 changed files with 29 additions and 36 deletions

View file

@ -255,6 +255,8 @@ private:
void handle_readonly_attribute(Optional<String> const& value);
WebIDL::ExceptionOr<void> handle_src_attribute(String const& value);
void user_interaction_did_change_input_value();
// https://html.spec.whatwg.org/multipage/input.html#value-sanitization-algorithm
String value_sanitization_algorithm(String const&) const;