[][src]Trait moxie_dom::interfaces::html_element::HtmlElement

pub trait HtmlElement: Element {
    fn accesskey(self, to_set: impl ToString) -> Self { ... }
fn autocapitalize(self, to_set: impl ToString) -> Self { ... }
fn contenteditable(self, to_set: bool) -> Self { ... }
fn data(self, key: impl ToString, value: impl AsRef<str>) -> Self { ... }
fn dir(self, to_set: impl ToString) -> Self { ... }
fn draggable(self, to_set: bool) -> Self { ... }
fn hidden(self, to_set: bool) -> Self { ... }
fn inert(self, to_set: bool) -> Self { ... }
fn inputmode(self, to_set: impl ToString) -> Self { ... }
fn lang(self, to_set: impl ToString) -> Self { ... }
fn slot(self, to_set: impl ToString) -> Self { ... }
fn spellcheck(self, to_set: impl ToString) -> Self { ... }
fn tabindex(self, to_set: impl ToString) -> Self { ... }
fn title(self, to_set: impl ToString) -> Self { ... } }

The HTMLElement interface represents any HTML element.

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

Provided methods

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

Keyboard shortcut to activate or add focus to the element.

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

Sets whether input is automatically capitalized when entered by user. It can have the following values:

  • off or none, no autocapitalization is applied (all letters default to lowercase)
  • on or sentences, the first letter of each sentence defaults to a capital letter; all other letters default to lowercase
  • words, the first letter of each word defaults to a capital letter; all other letters default to lowercase
  • characters, all letters should default to uppercase

fn contenteditable(self, to_set: bool) -> Self

A value of "true" means the element is editable and a value of "false" means it isn't.

fn data(self, key: impl ToString, value: impl AsRef<str>) -> Self

Forms a class of attributes, called custom data attributes, that allow proprietary information to be exchanged between the HTML and its DOM representation that may be used by scripts.

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

The directionality of the element. It can have the following values:

  • ltr, which means left to right and is to be used for languages that are written from the left to the right (like English);
  • rtl, which means right to left and is to be used for languages that are written from the right to the left (like Arabic);
  • auto, which lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then it applies that directionality to the whole element.

fn draggable(self, to_set: bool) -> Self

Defines whether the element can be dragged.

fn hidden(self, to_set: bool) -> Self

Indicates if the element is hidden or not.

fn inert(self, to_set: bool) -> Self

Indicates whether the user agent must act as though the given node is absent for the purposes of user interaction events, in-page text searches ("find in page"), and text selection.

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

Provides a hint as to the type of data that might be entered by the user while editing the element or its contents. The attribute can be used with form controls (such as the value of textarea elements), or in elements in an editing host (e.g., using contenteditable attribute).

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

The language of an element's attributes, text, and element contents.

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

Assigns a slot in a shadow DOM shadow tree to an element.

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

Indicates whether spell checking is allowed for the element.

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

Overrides the browser's default tab order and follows the one specified instead.

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

The text that appears in a popup box when mouse is over the element.

Loading content...

Implementors

impl HtmlElement for EmbedBuilder[src]

impl HtmlElement for IframeBuilder[src]

impl HtmlElement for ObjectBuilder[src]

impl HtmlElement for ParamBuilder[src]

impl HtmlElement for PictureBuilder[src]

impl HtmlElement for SourceBuilder[src]

impl HtmlElement for ButtonBuilder[src]

impl HtmlElement for DatalistBuilder[src]

impl HtmlElement for FieldsetBuilder[src]

impl HtmlElement for FormBuilder[src]

impl HtmlElement for InputBuilder[src]

impl HtmlElement for LabelBuilder[src]

impl HtmlElement for LegendBuilder[src]

impl HtmlElement for MeterBuilder[src]

impl HtmlElement for OptgroupBuilder[src]

impl HtmlElement for OptionBuilder[src]

impl HtmlElement for OutputBuilder[src]

impl HtmlElement for ProgressBuilder[src]

impl HtmlElement for SelectBuilder[src]

impl HtmlElement for TextareaBuilder[src]

impl HtmlElement for DetailsBuilder[src]

impl HtmlElement for DialogBuilder[src]

impl HtmlElement for MenuBuilder[src]

impl HtmlElement for SummaryBuilder[src]

impl HtmlElement for AreaBuilder[src]

impl HtmlElement for AudioBuilder[src]

impl HtmlElement for ImgBuilder[src]

impl HtmlElement for MapBuilder[src]

impl HtmlElement for TrackBuilder[src]

impl HtmlElement for VideoBuilder[src]

impl HtmlElement for BaseBuilder[src]

impl HtmlElement for HeadBuilder[src]

impl HtmlElement for LinkBuilder[src]

impl HtmlElement for MetaBuilder[src]

impl HtmlElement for StyleBuilder[src]

impl HtmlElement for TitleBuilder[src]

impl HtmlElement for CanvasBuilder[src]

impl HtmlElement for NoscriptBuilder[src]

impl HtmlElement for ScriptBuilder[src]

impl HtmlElement for AddressBuilder[src]

impl HtmlElement for ArticleBuilder[src]

impl HtmlElement for AsideBuilder[src]

impl HtmlElement for FooterBuilder[src]

impl HtmlElement for H1Builder[src]

impl HtmlElement for H2Builder[src]

impl HtmlElement for H3Builder[src]

impl HtmlElement for H4Builder[src]

impl HtmlElement for H5Builder[src]

impl HtmlElement for H6Builder[src]

impl HtmlElement for HeaderBuilder[src]

impl HtmlElement for HgroupBuilder[src]

impl HtmlElement for MainBuilder[src]

impl HtmlElement for NavBuilder[src]

impl HtmlElement for SectionBuilder[src]

impl HtmlElement for BodyBuilder[src]

impl HtmlElement for HtmlBuilder[src]

impl HtmlElement for SlotBuilder[src]

impl HtmlElement for TemplateBuilder[src]

impl HtmlElement for CaptionBuilder[src]

impl HtmlElement for ColBuilder[src]

impl HtmlElement for ColgroupBuilder[src]

impl HtmlElement for TableBuilder[src]

impl HtmlElement for TbodyBuilder[src]

impl HtmlElement for TdBuilder[src]

impl HtmlElement for TfootBuilder[src]

impl HtmlElement for ThBuilder[src]

impl HtmlElement for TheadBuilder[src]

impl HtmlElement for TrBuilder[src]

impl HtmlElement for BlockquoteBuilder[src]

impl HtmlElement for DdBuilder[src]

impl HtmlElement for DivBuilder[src]

impl HtmlElement for DlBuilder[src]

impl HtmlElement for DtBuilder[src]

impl HtmlElement for FigcaptionBuilder[src]

impl HtmlElement for FigureBuilder[src]

impl HtmlElement for HrBuilder[src]

impl HtmlElement for LiBuilder[src]

impl HtmlElement for OlBuilder[src]

impl HtmlElement for PBuilder[src]

impl HtmlElement for PreBuilder[src]

impl HtmlElement for UlBuilder[src]

impl HtmlElement for ABuilder[src]

impl HtmlElement for AbbrBuilder[src]

impl HtmlElement for BBuilder[src]

impl HtmlElement for BdiBuilder[src]

impl HtmlElement for BdoBuilder[src]

impl HtmlElement for BrBuilder[src]

impl HtmlElement for CiteBuilder[src]

impl HtmlElement for CodeBuilder[src]

impl HtmlElement for DataBuilder[src]

impl HtmlElement for DelBuilder[src]

impl HtmlElement for DfnBuilder[src]

impl HtmlElement for EmBuilder[src]

impl HtmlElement for IBuilder[src]

impl HtmlElement for InsBuilder[src]

impl HtmlElement for KbdBuilder[src]

impl HtmlElement for MarkBuilder[src]

impl HtmlElement for QBuilder[src]

impl HtmlElement for RbBuilder[src]

impl HtmlElement for RpBuilder[src]

impl HtmlElement for RtBuilder[src]

impl HtmlElement for RtcBuilder[src]

impl HtmlElement for RubyBuilder[src]

impl HtmlElement for SBuilder[src]

impl HtmlElement for SampBuilder[src]

impl HtmlElement for SmallBuilder[src]

impl HtmlElement for SpanBuilder[src]

impl HtmlElement for StrongBuilder[src]

impl HtmlElement for SubBuilder[src]

impl HtmlElement for SupBuilder[src]

impl HtmlElement for TimeBuilder[src]

impl HtmlElement for UBuilder[src]

impl HtmlElement for VarBuilder[src]

impl HtmlElement for WbrBuilder[src]

Loading content...