mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 22:52:22 +02:00
LibWeb: Fully implement the HTMLInputElement value setter and getter
The setter was missing an implementation for the default and default/on value attribute modes. This patch adds a method to get the current value attribute mode, and implements the value setter and getter based on that mode according to the spec.
This commit is contained in:
committed by
Alexander Kalenik
parent
cfb9c5bb0e
commit
ce9ad3a236
Notes:
sideshowbarker
2024-07-17 01:55:29 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/ce9ad3a236 Pull-request: https://github.com/SerenityOS/serenity/pull/23236 Issue: https://github.com/SerenityOS/serenity/issues/23234
@@ -216,6 +216,14 @@ private:
|
||||
// https://html.spec.whatwg.org/multipage/input.html#value-sanitization-algorithm
|
||||
String value_sanitization_algorithm(String const&) const;
|
||||
|
||||
enum class ValueAttributeMode {
|
||||
Value,
|
||||
Default,
|
||||
DefaultOn,
|
||||
Filename,
|
||||
};
|
||||
ValueAttributeMode value_attribute_mode() const;
|
||||
|
||||
void update_placeholder_visibility();
|
||||
JS::GCPtr<DOM::Element> m_placeholder_element;
|
||||
JS::GCPtr<DOM::Text> m_placeholder_text_node;
|
||||
|
||||
Reference in New Issue
Block a user