1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:17:35 +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

@ -194,3 +194,10 @@ ul,
ol {
padding-left: 20px;
}
/* FIXME: This is a temporary hack until we can render a native-looking frame for these. */
input[type=text] {
border: 1px solid black;
min-width: 80px;
min-height: 16px;
}