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

pub trait ElementBuilder: NodeWrapper {
    pub fn attribute(self, name: &'static str, value: impl AsRef<str>) -> Self { ... }
pub fn class(self, to_set: impl ToString) -> Self { ... }
pub fn id(self, to_set: impl ToString) -> Self { ... }
pub 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

pub fn attribute(self, name: &'static str, value: impl AsRef<str>) -> Self[src]

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).

pub fn class(self, to_set: impl ToString) -> Self[src]

Updates the element's class.

pub fn id(self, to_set: impl ToString) -> Self[src]

Updates the element's id.

pub fn style(self, to_set: impl ToString) -> Self[src]

Updates the element's style.

Loading content...

Implementors

impl ElementBuilder for EmbedBuilder[src]

impl ElementBuilder for IframeBuilder[src]

impl ElementBuilder for ObjectBuilder[src]

impl ElementBuilder for ParamBuilder[src]

impl ElementBuilder for PictureBuilder[src]

impl ElementBuilder for SourceBuilder[src]

impl ElementBuilder for ButtonBuilder[src]

impl ElementBuilder for DatalistBuilder[src]

impl ElementBuilder for FieldsetBuilder[src]

impl ElementBuilder for FormBuilder[src]

impl ElementBuilder for InputBuilder[src]

impl ElementBuilder for LabelBuilder[src]

impl ElementBuilder for LegendBuilder[src]

impl ElementBuilder for MeterBuilder[src]

impl ElementBuilder for OptgroupBuilder[src]

impl ElementBuilder for OptionBuilder[src]

impl ElementBuilder for OutputBuilder[src]

impl ElementBuilder for ProgressBuilder[src]

impl ElementBuilder for SelectBuilder[src]

impl ElementBuilder for TextareaBuilder[src]

impl ElementBuilder for DetailsBuilder[src]

impl ElementBuilder for DialogBuilder[src]

impl ElementBuilder for MenuBuilder[src]

impl ElementBuilder for SummaryBuilder[src]

impl ElementBuilder for AreaBuilder[src]

impl ElementBuilder for AudioBuilder[src]

impl ElementBuilder for ImgBuilder[src]

impl ElementBuilder for MapBuilder[src]

impl ElementBuilder for TrackBuilder[src]

impl ElementBuilder for VideoBuilder[src]

impl ElementBuilder for BaseBuilder[src]

impl ElementBuilder for HeadBuilder[src]

impl ElementBuilder for LinkBuilder[src]

impl ElementBuilder for MetaBuilder[src]

impl ElementBuilder for StyleBuilder[src]

impl ElementBuilder for TitleBuilder[src]

impl ElementBuilder for CanvasBuilder[src]

impl ElementBuilder for NoscriptBuilder[src]

impl ElementBuilder for ScriptBuilder[src]

impl ElementBuilder for AddressBuilder[src]

impl ElementBuilder for ArticleBuilder[src]

impl ElementBuilder for AsideBuilder[src]

impl ElementBuilder for FooterBuilder[src]

impl ElementBuilder for H1Builder[src]

impl ElementBuilder for H2Builder[src]

impl ElementBuilder for H3Builder[src]

impl ElementBuilder for H4Builder[src]

impl ElementBuilder for H5Builder[src]

impl ElementBuilder for H6Builder[src]

impl ElementBuilder for HeaderBuilder[src]

impl ElementBuilder for HgroupBuilder[src]

impl ElementBuilder for MainBuilder[src]

impl ElementBuilder for NavBuilder[src]

impl ElementBuilder for SectionBuilder[src]

impl ElementBuilder for BodyBuilder[src]

impl ElementBuilder for HtmlBuilder[src]

impl ElementBuilder for SlotBuilder[src]

impl ElementBuilder for TemplateBuilder[src]

impl ElementBuilder for CaptionBuilder[src]

impl ElementBuilder for ColBuilder[src]

impl ElementBuilder for ColgroupBuilder[src]

impl ElementBuilder for TableBuilder[src]

impl ElementBuilder for TbodyBuilder[src]

impl ElementBuilder for TdBuilder[src]

impl ElementBuilder for TfootBuilder[src]

impl ElementBuilder for ThBuilder[src]

impl ElementBuilder for TheadBuilder[src]

impl ElementBuilder for TrBuilder[src]

impl ElementBuilder for BlockquoteBuilder[src]

impl ElementBuilder for DdBuilder[src]

impl ElementBuilder for DivBuilder[src]

impl ElementBuilder for DlBuilder[src]

impl ElementBuilder for DtBuilder[src]

impl ElementBuilder for FigcaptionBuilder[src]

impl ElementBuilder for FigureBuilder[src]

impl ElementBuilder for HrBuilder[src]

impl ElementBuilder for LiBuilder[src]

impl ElementBuilder for OlBuilder[src]

impl ElementBuilder for PBuilder[src]

impl ElementBuilder for PreBuilder[src]

impl ElementBuilder for UlBuilder[src]

impl ElementBuilder for ABuilder[src]

impl ElementBuilder for AbbrBuilder[src]

impl ElementBuilder for BBuilder[src]

impl ElementBuilder for BdiBuilder[src]

impl ElementBuilder for BdoBuilder[src]

impl ElementBuilder for BrBuilder[src]

impl ElementBuilder for CiteBuilder[src]

impl ElementBuilder for CodeBuilder[src]

impl ElementBuilder for DataBuilder[src]

impl ElementBuilder for DelBuilder[src]

impl ElementBuilder for DfnBuilder[src]

impl ElementBuilder for EmBuilder[src]

impl ElementBuilder for IBuilder[src]

impl ElementBuilder for InsBuilder[src]

impl ElementBuilder for KbdBuilder[src]

impl ElementBuilder for MarkBuilder[src]

impl ElementBuilder for QBuilder[src]

impl ElementBuilder for RbBuilder[src]

impl ElementBuilder for RpBuilder[src]

impl ElementBuilder for RtBuilder[src]

impl ElementBuilder for RtcBuilder[src]

impl ElementBuilder for RubyBuilder[src]

impl ElementBuilder for SBuilder[src]

impl ElementBuilder for SampBuilder[src]

impl ElementBuilder for SmallBuilder[src]

impl ElementBuilder for SpanBuilder[src]

impl ElementBuilder for StrongBuilder[src]

impl ElementBuilder for SubBuilder[src]

impl ElementBuilder for SupBuilder[src]

impl ElementBuilder for TimeBuilder[src]

impl ElementBuilder for UBuilder[src]

impl ElementBuilder for VarBuilder[src]

impl ElementBuilder for WbrBuilder[src]

Loading content...