Expand description
HtmlElement — shared behavior for ALL HTML elements.
Like Chrome’s HTMLElement (500+ lines of shared logic).
Every HTML element (Div, Button, Input, etc.) implements this trait.
SVG/MathML elements would NOT implement it.
All methods have default implementations — concrete elements get them for free. Override only what differs (like Chrome’s virtual methods).
§Chrome equivalence
| Chrome method | Kozan trait method |
|---|---|
hidden() | hidden() |
title() | title() |
lang() | lang() |
dir() | dir() |
tabIndex | tab_index() |
click() | click() |
focus() | focus() |
blur() | blur() |
draggable | draggable() |
spellcheck | spellcheck() |
CollectStyleForPresAttr | presentation_style() |
Traits§
- Html
Element - Shared behavior for all HTML elements.