[][src]Trait moxie_dom::interfaces::element::Element

pub trait Element: Node {
    fn attribute(self, name: &str, value: impl AsRef<str>) -> Self { ... }
fn class(self, to_set: impl ToString) -> Self { ... }
fn id(self, to_set: impl ToString) -> Self { ... }
fn style(self, to_set: impl ToString) -> Self { ... } }

Element is the most general base class from which all element objects (i.e. objects that represent elements) in a Document inherit. It only has methods and properties common to all kinds of elements. More specific classes inherit from Element. For example, the HTMLElement interface is the base interface for HTML elements, while the SVGElement interface is the basis for all SVG elements. Most functionality is specified further down the class hierarchy.

Note: this trait cannot be implemented outside of this crate.

Provided methods

fn attribute(self, name: &str, value: impl AsRef<str>) -> Self

Declare an attribute of the element, mutating the actual element's attribute when the passed value changes.

A guard value is stored as a resulting "effect" of the mutation, and removes the attribute when dropped, to ensure that the attribute is removed when this declaration is no longer referenced in the most recent (moxie::Revision).

fn class(self, to_set: impl ToString) -> Self

Updates the element's class.

fn id(self, to_set: impl ToString) -> Self

Updates the element's id.

fn style(self, to_set: impl ToString) -> Self

Updates the element's style.

Loading content...

Implementors

impl Element for EmbedBuilder[src]

impl Element for IframeBuilder[src]

impl Element for ObjectBuilder[src]

impl Element for ParamBuilder[src]

impl Element for PictureBuilder[src]

impl Element for SourceBuilder[src]

impl Element for ButtonBuilder[src]

impl Element for DatalistBuilder[src]

impl Element for FieldsetBuilder[src]

impl Element for FormBuilder[src]

impl Element for InputBuilder[src]

impl Element for LabelBuilder[src]

impl Element for LegendBuilder[src]

impl Element for MeterBuilder[src]

impl Element for OptgroupBuilder[src]

impl Element for OptionBuilder[src]

impl Element for OutputBuilder[src]

impl Element for ProgressBuilder[src]

impl Element for SelectBuilder[src]

impl Element for TextareaBuilder[src]

impl Element for DetailsBuilder[src]

impl Element for DialogBuilder[src]

impl Element for MenuBuilder[src]

impl Element for SummaryBuilder[src]

impl Element for AreaBuilder[src]

impl Element for AudioBuilder[src]

impl Element for ImgBuilder[src]

impl Element for MapBuilder[src]

impl Element for TrackBuilder[src]

impl Element for VideoBuilder[src]

impl Element for BaseBuilder[src]

impl Element for HeadBuilder[src]

impl Element for LinkBuilder[src]

impl Element for MetaBuilder[src]

impl Element for StyleBuilder[src]

impl Element for TitleBuilder[src]

impl Element for CanvasBuilder[src]

impl Element for NoscriptBuilder[src]

impl Element for ScriptBuilder[src]

impl Element for AddressBuilder[src]

impl Element for ArticleBuilder[src]

impl Element for AsideBuilder[src]

impl Element for FooterBuilder[src]

impl Element for H1Builder[src]

impl Element for H2Builder[src]

impl Element for H3Builder[src]

impl Element for H4Builder[src]

impl Element for H5Builder[src]

impl Element for H6Builder[src]

impl Element for HeaderBuilder[src]

impl Element for HgroupBuilder[src]

impl Element for MainBuilder[src]

impl Element for NavBuilder[src]

impl Element for SectionBuilder[src]

impl Element for BodyBuilder[src]

impl Element for HtmlBuilder[src]

impl Element for SlotBuilder[src]

impl Element for TemplateBuilder[src]

impl Element for CaptionBuilder[src]

impl Element for ColBuilder[src]

impl Element for ColgroupBuilder[src]

impl Element for TableBuilder[src]

impl Element for TbodyBuilder[src]

impl Element for TdBuilder[src]

impl Element for TfootBuilder[src]

impl Element for ThBuilder[src]

impl Element for TheadBuilder[src]

impl Element for TrBuilder[src]

impl Element for BlockquoteBuilder[src]

impl Element for DdBuilder[src]

impl Element for DivBuilder[src]

impl Element for DlBuilder[src]

impl Element for DtBuilder[src]

impl Element for FigcaptionBuilder[src]

impl Element for FigureBuilder[src]

impl Element for HrBuilder[src]

impl Element for LiBuilder[src]

impl Element for OlBuilder[src]

impl Element for PBuilder[src]

impl Element for PreBuilder[src]

impl Element for UlBuilder[src]

impl Element for ABuilder[src]

impl Element for AbbrBuilder[src]

impl Element for BBuilder[src]

impl Element for BdiBuilder[src]

impl Element for BdoBuilder[src]

impl Element for BrBuilder[src]

impl Element for CiteBuilder[src]

impl Element for CodeBuilder[src]

impl Element for DataBuilder[src]

impl Element for DelBuilder[src]

impl Element for DfnBuilder[src]

impl Element for EmBuilder[src]

impl Element for IBuilder[src]

impl Element for InsBuilder[src]

impl Element for KbdBuilder[src]

impl Element for MarkBuilder[src]

impl Element for QBuilder[src]

impl Element for RbBuilder[src]

impl Element for RpBuilder[src]

impl Element for RtBuilder[src]

impl Element for RtcBuilder[src]

impl Element for RubyBuilder[src]

impl Element for SBuilder[src]

impl Element for SampBuilder[src]

impl Element for SmallBuilder[src]

impl Element for SpanBuilder[src]

impl Element for StrongBuilder[src]

impl Element for SubBuilder[src]

impl Element for SupBuilder[src]

impl Element for TimeBuilder[src]

impl Element for UBuilder[src]

impl Element for VarBuilder[src]

impl Element for WbrBuilder[src]

Loading content...