Module sauron::prelude::html::attributes[][src]

Expand description

Create html attributes

Structs

A generic sized representation of a function that can be attached to a Node. The callback will essentially be owned by the element

css styles style can be converted into an attribute

Enums

Values of an attribute can be in these variants

TODO: merge this with AttributeValue Value is an abstraction of the values used in the actual backend. Html and gtk-rs have different set of compatible values therefore a need for a storage of these intermediate value is needed

Constants

These are most commonly used html attributes such as class, id, etc

These are html attributes with names that are non proper rust identifier therefore handled differently. ie: (for, in)

Traits

Special Node attributes that are treated differently such as key and skip which both greatly affects the diffing algorithm

Functions

Creates html accept attribute

Creates html accept-charset attribute

Creates html accesskey attribute

Creates html action attribute

Creates html align attribute

Creates html allow attribute

Creates html alt attribute

Creates html async attribute

a utility function to convert simple value into attribute

A helper function for setting attributes with no values such as checked in checkbox input type This is best called to be appended to the node since this returns an array of attributes which doesn’t play well with the others

Creates html autocapitalize attribute

Creates html autocomplete attribute

Creates html autofocus attribute

Creates html autoplay attribute

Creates html background attribute

Creates html bgcolor attribute

Creates html border attribute

Creates html buffered attribute

Creates html challenge attribute

Creates html charset attribute

set the checked value, used checkbox and radio buttons

Creates html cite attribute

Creates html class attribute

return a class attribute where the classnames are transformed with namespace

a helper function to add multiple classes to a node

A helper function which takes an array of tuple of class and a flag. The final class is assembled using only the values that has a flag which evaluates to true.

return a class namespaced with flag

Creates html codebase attribute

Creates html color attribute

Creates html cols attribute

Creates html colspan attribute

Creates html content attribute

Creates html contenteditable attribute

Creates html contextmenu attribute

Creates html controls attribute

Creates html coords attribute

Creates html crossorigin attribute

Creates html csp attribute

Creates html data attribute

Creates html datetime attribute

Creates html decoding attribute

Creates html default attribute

Creates html defer attribute

Creates html dir attribute

Creates html dirname attribute

set whether an element is disabled or not

Creates html download attribute

Creates html draggable attribute

Creates html dropzone attribute

a utility function to return create an empty attr, useful for cases where branch expression need to return an attribute which otherwise it can not produce example:

Creates html enctype attribute

Creates html enterkeyhint attribute

Creates html flex-direction attribute

focus the html element

Creates html font-family attribute

Creates html font-size attribute

Creates html for attribute

Creates html formaction attribute

Creates html formnovalidate attribute

Creates html headers attribute

Creates html height attribute

Creates html hidden attribute

Creates html high attribute

Creates html href attribute

Creates html hreflang attribute

Creates html http attribute

Creates html icon attribute

Creates html id attribute

Creates html importance attribute

set the inner html of this element without comparing in the diff this always sets the value This is for optimization purposes and will lead to some hacks in the implementation

Creates html inputmode attribute

Creates html integrity attribute

Creates html intrinsicsize attribute

Creates html ismap attribute

Creates html itemprop attribute

key attributes is used to match old element and new element when diffing

Creates html keytype attribute

Creates html kind attribute

Creates html lang attribute

Creates html language attribute

Creates html list attribute

Creates html loading attribute

Creates html loop attribute

Creates html low attribute

Creates html manifest attribute

Creates html max attribute

Creates html maxlength attribute

Creates html media attribute

Creates html method attribute

Creates html min attribute

Creates html minlength attribute

Creates html multiple attribute

Creates html muted attribute

Creates html name attribute

Creates html novalidate attribute

Creates html open attribute

Creates html optimum attribute

Creates html pattern attribute

Creates html ping attribute

Creates html placeholder attribute

Creates html poster attribute

Creates html preload attribute

Creates html radiogroup attribute

Creates html readonly attribute

Creates html referrerpolicy attribute

Creates html rel attribute

if the value is true, then this node is made to replace the old node it matches

Creates html required attribute

Creates html reversed attribute

Creates html rows attribute

Creates html rowspan attribute

Creates html sandbox attribute

Creates html scope attribute

Creates html scoped attribute

Creates html selected attribute

Creates html shape attribute

Creates html size attribute

Creates html sizes attribute

if the value is true, then the diffing of this element and its descendants are skip entirely

Creates html slot attribute

Creates html spellcheck attribute

Creates html src attribute

Creates html srcdoc attribute

Creates html srclang attribute

Creates html srcset attribute

Creates html start attribute

Creates html step attribute

create a style attribute

A helper function which creates a style attribute by assembling the tuples into a string for the style value.

A helper function which creates a style attribute by assembling only the parts that passed the boolean flag.

A helper function to build styles by accepting pairs

Creates html summary attribute

Creates html tabindex attribute

Creates html target attribute

Creates html title attribute

Creates html translate attribute

Creates html type attribute

Creates html usemap attribute

Creates html value attribute

Creates html width attribute

Creates html wrap attribute