1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00

LibWeb: Start implementing <input type=text> using a shadow DOM

Text <input> fields will now generate a basic shadow DOM and attach it
to the input element.

The shadow DOM contains a <div> with some inline style, and an always-
editable text node inside it. Accessing the "value" attribute on such
an input element will get/set the value from that text node.

This is really cool, although not super stable since HTML editing is
not super stable. But it's a start! :^)
This commit is contained in:
Andreas Kling 2021-02-10 18:26:07 +01:00
parent e4e325ff61
commit 29a2aac89a
4 changed files with 58 additions and 3 deletions

View file

@ -11,6 +11,8 @@ interface HTMLInputElement : HTMLElement {
[Reflect=dirname] attribute DOMString dirName;
[Reflect=value] attribute DOMString defaultValue;
[LegacyNullToEmptyString] attribute DOMString value;
attribute boolean checked;
[Reflect] attribute boolean disabled;