LibWeb: Implement HTMLElement.inputMode

This reflects the value of the `inputmode` content attribute
This commit is contained in:
Tim Ledbetter 2024-11-26 14:34:25 +00:00 committed by Andreas Kling
commit 12fc1de9ca
Notes: github-actions[bot] 2024-11-26 18:09:03 +00:00
2 changed files with 14 additions and 1 deletions

View file

@ -100,6 +100,7 @@ namespace AttributeNames {
__ENUMERATE_HTML_ATTRIBUTE(is) \
__ENUMERATE_HTML_ATTRIBUTE(iscontenteditable) \
__ENUMERATE_HTML_ATTRIBUTE(ismap) \
__ENUMERATE_HTML_ATTRIBUTE(inputmode) \
__ENUMERATE_HTML_ATTRIBUTE(itemscope) \
__ENUMERATE_HTML_ATTRIBUTE(kind) \
__ENUMERATE_HTML_ATTRIBUTE(label) \

View file

@ -52,12 +52,24 @@ HTMLElement includes GlobalEventHandlers;
HTMLElement includes ElementContentEditable;
HTMLElement includes HTMLOrSVGElement;
// https://html.spec.whatwg.org/#attr-inputmode
enum InputMode {
"none",
"text",
"tel",
"url",
"email",
"numeric",
"decimal",
"search"
};
// https://html.spec.whatwg.org/#elementcontenteditable
interface mixin ElementContentEditable {
[CEReactions] attribute DOMString contentEditable;
[FIXME, CEReactions] attribute DOMString enterKeyHint;
readonly attribute boolean isContentEditable;
[FIXME, CEReactions] attribute DOMString inputMode;
[Reflect=inputmode, Enumerated=InputMode, CEReactions] attribute DOMString inputMode;
};
HTMLElement includes ElementCSSInlineStyle;