Trait typed_html::dom::Element
source · pub trait Element<T: OutputType>: Node<T> {
fn name() -> &'static str;
fn attribute_names() -> &'static [&'static str];
fn required_children() -> &'static [&'static str];
fn attributes(&self) -> Vec<(&'static str, String)> ⓘ;
}
Expand description
Trait for querying a typed HTML element.
All HTML elements implement this.
Required Methods
sourcefn attribute_names() -> &'static [&'static str]
fn attribute_names() -> &'static [&'static str]
Get a list of the attribute names for this element.
This includes only the typed attributes, not any data-
attributes
defined on this particular element instance.
This is probably not useful unless you’re the html!
macro.
sourcefn required_children() -> &'static [&'static str]
fn required_children() -> &'static [&'static str]
Get a list of the element names of required children for this element.
This is probably not useful unless you’re the html!
macro.