Skip to main content

GlobalAttributes

Trait GlobalAttributes 

Source
pub trait GlobalAttributes<V>: Sized + AddAnyAttr
where V: AttributeValue,
{
Show 29 methods // Provided methods fn accesskey(self, value: V) -> Self::Output<Attr<Accesskey, V>> { ... } fn autocapitalize(self, value: V) -> Self::Output<Attr<Autocapitalize, V>> { ... } fn autofocus(self, value: V) -> Self::Output<Attr<Autofocus, V>> { ... } fn contenteditable(self, value: V) -> Self::Output<Attr<Contenteditable, V>> { ... } fn dir(self, value: V) -> Self::Output<Attr<Dir, V>> { ... } fn draggable(self, value: V) -> Self::Output<Attr<Draggable, V>> { ... } fn enterkeyhint(self, value: V) -> Self::Output<Attr<Enterkeyhint, V>> { ... } fn exportparts(self, value: V) -> Self::Output<Attr<Exportparts, V>> { ... } fn hidden(self, value: V) -> Self::Output<Attr<Hidden, V>> { ... } fn id(self, value: V) -> Self::Output<Attr<Id, V>> { ... } fn inert(self, value: V) -> Self::Output<Attr<Inert, V>> { ... } fn inputmode(self, value: V) -> Self::Output<Attr<Inputmode, V>> { ... } fn is(self, value: V) -> Self::Output<Attr<Is, V>> { ... } fn itemid(self, value: V) -> Self::Output<Attr<Itemid, V>> { ... } fn itemprop(self, value: V) -> Self::Output<Attr<Itemprop, V>> { ... } fn itemref(self, value: V) -> Self::Output<Attr<Itemref, V>> { ... } fn itemscope(self, value: V) -> Self::Output<Attr<Itemscope, V>> { ... } fn itemtype(self, value: V) -> Self::Output<Attr<Itemtype, V>> { ... } fn lang(self, value: V) -> Self::Output<Attr<Lang, V>> { ... } fn nonce(self, value: V) -> Self::Output<Attr<Nonce, V>> { ... } fn part(self, value: V) -> Self::Output<Attr<Part, V>> { ... } fn popover(self, value: V) -> Self::Output<Attr<Popover, V>> { ... } fn role(self, value: V) -> Self::Output<Attr<Role, V>> { ... } fn slot(self, value: V) -> Self::Output<Attr<Slot, V>> { ... } fn spellcheck(self, value: V) -> Self::Output<Attr<Spellcheck, V>> { ... } fn tabindex(self, value: V) -> Self::Output<Attr<Tabindex, V>> { ... } fn title(self, value: V) -> Self::Output<Attr<Title, V>> { ... } fn translate(self, value: V) -> Self::Output<Attr<Translate, V>> { ... } fn virtualkeyboardpolicy( self, value: V, ) -> Self::Output<Attr<Virtualkeyboardpolicy, V>> { ... }
}
Expand description

Global attributes can be added to any HTML element.

Provided Methods§

Source

fn accesskey(self, value: V) -> Self::Output<Attr<Accesskey, V>>

The accesskey global attribute provides a hint for generating a keyboard shortcut for the current element.

Source

fn autocapitalize(self, value: V) -> Self::Output<Attr<Autocapitalize, V>>

The autocapitalize global attribute controls whether and how text input is automatically capitalized as it is entered/edited by the user.

Source

fn autofocus(self, value: V) -> Self::Output<Attr<Autofocus, V>>

The autofocus global attribute is a Boolean attribute indicating that an element should receive focus as soon as the page is loaded.

Source

fn contenteditable(self, value: V) -> Self::Output<Attr<Contenteditable, V>>

The contenteditable global attribute is an enumerated attribute indicating if the element should be editable by the user.

Source

fn dir(self, value: V) -> Self::Output<Attr<Dir, V>>

The dir global attribute is an enumerated attribute indicating the directionality of the element’s text.

Source

fn draggable(self, value: V) -> Self::Output<Attr<Draggable, V>>

The draggable global attribute is an enumerated attribute indicating whether the element can be dragged.

Source

fn enterkeyhint(self, value: V) -> Self::Output<Attr<Enterkeyhint, V>>

The enterkeyhint global attribute is used to customize the enter key on virtual keyboards.

Source

fn exportparts(self, value: V) -> Self::Output<Attr<Exportparts, V>>

The exportparts attribute enables the sharing of parts of an element’s shadow DOM with a containing document.

Source

fn hidden(self, value: V) -> Self::Output<Attr<Hidden, V>>

The hidden global attribute is a Boolean attribute indicating that the element is not yet, or is no longer, relevant.

Source

fn id(self, value: V) -> Self::Output<Attr<Id, V>>

The id global attribute defines a unique identifier (ID) which must be unique in the whole document.

Source

fn inert(self, value: V) -> Self::Output<Attr<Inert, V>>

The inert global attribute is a Boolean attribute that makes an element behave inertly.

Source

fn inputmode(self, value: V) -> Self::Output<Attr<Inputmode, V>>

The inputmode global attribute provides a hint to browsers for which virtual keyboard to display.

Source

fn is(self, value: V) -> Self::Output<Attr<Is, V>>

The is global attribute allows you to specify that a standard HTML element should behave like a custom built-in element.

Source

fn itemid(self, value: V) -> Self::Output<Attr<Itemid, V>>

The itemid global attribute is used to specify the unique, global identifier of an item.

Source

fn itemprop(self, value: V) -> Self::Output<Attr<Itemprop, V>>

The itemprop global attribute is used to add properties to an item.

Source

fn itemref(self, value: V) -> Self::Output<Attr<Itemref, V>>

The itemref global attribute is used to refer to other elements.

Source

fn itemscope(self, value: V) -> Self::Output<Attr<Itemscope, V>>

The itemscope global attribute is used to create a new item.

Source

fn itemtype(self, value: V) -> Self::Output<Attr<Itemtype, V>>

The itemtype global attribute is used to specify the types of items.

Source

fn lang(self, value: V) -> Self::Output<Attr<Lang, V>>

The lang global attribute helps define the language of an element.

Source

fn nonce(self, value: V) -> Self::Output<Attr<Nonce, V>>

The nonce global attribute is used to specify a cryptographic nonce.

Source

fn part(self, value: V) -> Self::Output<Attr<Part, V>>

The part global attribute identifies the element as a part of a component.

Source

fn popover(self, value: V) -> Self::Output<Attr<Popover, V>>

The popover global attribute defines the popover’s behavior.

Source

fn role(self, value: V) -> Self::Output<Attr<Role, V>>

The role global attribute defines the role of an element in ARIA.

Source

fn slot(self, value: V) -> Self::Output<Attr<Slot, V>>

The slot global attribute assigns a slot in a shadow DOM.

Source

fn spellcheck(self, value: V) -> Self::Output<Attr<Spellcheck, V>>

The spellcheck global attribute is an enumerated attribute that defines whether the element may be checked for spelling errors.

Source

fn tabindex(self, value: V) -> Self::Output<Attr<Tabindex, V>>

The tabindex global attribute indicates if the element can take input focus.

Source

fn title(self, value: V) -> Self::Output<Attr<Title, V>>

The title global attribute contains text representing advisory information.

Source

fn translate(self, value: V) -> Self::Output<Attr<Translate, V>>

The translate global attribute is an enumerated attribute that specifies whether an element’s attribute values and text content should be translated when the page is localized.

Source

fn virtualkeyboardpolicy( self, value: V, ) -> Self::Output<Attr<Virtualkeyboardpolicy, V>>

The virtualkeyboardpolicy global attribute specifies the behavior of the virtual keyboard.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<El, At, Ch, V> GlobalAttributes<V> for HtmlElement<El, At, Ch>