Skip to main content

Module html_element

Module html_element 

Source
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 methodKozan trait method
hidden()hidden()
title()title()
lang()lang()
dir()dir()
tabIndextab_index()
click()click()
focus()focus()
blur()blur()
draggabledraggable()
spellcheckspellcheck()
CollectStyleForPresAttrpresentation_style()

Traits§

HtmlElement
Shared behavior for all HTML elements.