diff --git a/tachys/src/dom.rs b/tachys/src/dom.rs
index 3968f624d..bb8f2ae7b 100644
--- a/tachys/src/dom.rs
+++ b/tachys/src/dom.rs
@@ -1,6 +1,5 @@
-use once_cell::unsync::Lazy;
use wasm_bindgen::JsCast;
-use web_sys::{Document, HtmlElement, Node, Window};
+use web_sys::{Document, HtmlElement, Window};
thread_local! {
pub(crate) static WINDOW: web_sys::Window = web_sys::window().unwrap();
@@ -20,27 +19,22 @@ pub fn window() -> Window {
///
/// This is cached as a thread-local variable, so calling `document()` multiple times
/// requires only one call out to JavaScript.
+///
+/// ## Panics
+/// Panics if called outside a browser environment.
pub fn document() -> Document {
DOCUMENT.with(Clone::clone)
}
+/// The `
` element.
+///
+/// ## Panics
+/// Panics if there is no `` in the current document, or if it is called outside a browser
+/// environment.
pub fn body() -> HtmlElement {
document().body().unwrap()
}
-pub fn comment() -> Node {
- thread_local! {
- static COMMENT: Lazy = Lazy::new(|| {
- document().create_comment("").unchecked_into()
- });
- }
- COMMENT.with(|n| n.clone_node().unwrap())
-}
-
-pub fn log(s: &str) {
- web_sys::console::log_1(&wasm_bindgen::JsValue::from_str(s));
-}
-
/// Helper function to extract [`Event.target`](https://developer.mozilla.org/en-US/docs/Web/API/Event/target)
/// from any event.
pub fn event_target(event: &web_sys::Event) -> T
diff --git a/tachys/src/html/attribute/any_attribute.rs b/tachys/src/html/attribute/any_attribute.rs
index 4bffb473f..df5e72ce3 100644
--- a/tachys/src/html/attribute/any_attribute.rs
+++ b/tachys/src/html/attribute/any_attribute.rs
@@ -8,6 +8,7 @@ use std::{
#[cfg(feature = "ssr")]
use std::{future::Future, pin::Pin};
+/// A type-erased container for any [`Attribute`].
pub struct AnyAttribute {
type_id: TypeId,
html_len: usize,
@@ -40,6 +41,7 @@ where
}
}
+/// View state for [`AnyAttribute`].
pub struct AnyAttributeState
where
R: Renderer,
@@ -50,10 +52,12 @@ where
rndr: PhantomData,
}
+/// Converts an [`Attribute`] into [`AnyAttribute`].
pub trait IntoAnyAttribute
where
R: Renderer,
{
+ /// Wraps the given attribute.
fn into_any_attr(self) -> AnyAttribute;
}
diff --git a/tachys/src/html/attribute/aria.rs b/tachys/src/html/attribute/aria.rs
index e12f5f89f..479397db4 100644
--- a/tachys/src/html/attribute/aria.rs
+++ b/tachys/src/html/attribute/aria.rs
@@ -3,12 +3,14 @@ use crate::{
view::add_attr::AddAnyAttr,
};
+/// Applies ARIA attributes to an HTML element.
pub trait AriaAttributes
where
Self: Sized + AddAnyAttr,
V: AttributeValue,
Rndr: Renderer,
{
+ /// Identifies the currently active descendant of a composite widget.
fn aria_activedescendant(
self,
value: V,
@@ -17,6 +19,7 @@ where
self.add_any_attr(aria_activedescendant(value))
}
+ /// Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the `aria-relevant` attribute.
fn aria_atomic(
self,
value: V,
@@ -24,6 +27,7 @@ where
self.add_any_attr(aria_atomic(value))
}
+ /// Indicates whether user input completion suggestions are provided.
fn aria_autocomplete(
self,
value: V,
@@ -32,6 +36,7 @@ where
self.add_any_attr(aria_autocomplete(value))
}
+ /// Indicates whether an element, and its subtree, are currently being updated.
fn aria_busy(
self,
value: V,
@@ -39,6 +44,7 @@ where
self.add_any_attr(aria_busy(value))
}
+ /// Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
fn aria_checked(
self,
value: V,
@@ -46,6 +52,7 @@ where
self.add_any_attr(aria_checked(value))
}
+ /// Defines the number of columns in a table, grid, or treegrid.
fn aria_colcount(
self,
value: V,
@@ -53,6 +60,7 @@ where
self.add_any_attr(aria_colcount(value))
}
+ /// Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
fn aria_colindex(
self,
value: V,
@@ -60,6 +68,7 @@ where
self.add_any_attr(aria_colindex(value))
}
+ /// Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
fn aria_colspan(
self,
value: V,
@@ -67,6 +76,7 @@ where
self.add_any_attr(aria_colspan(value))
}
+ /// Identifies the element (or elements) whose contents or presence are controlled by the current element.
fn aria_controls(
self,
value: V,
@@ -74,6 +84,7 @@ where
self.add_any_attr(aria_controls(value))
}
+ /// Indicates the element that represents the current item within a container or set of related elements.
fn aria_current(
self,
value: V,
@@ -81,6 +92,7 @@ where
self.add_any_attr(aria_current(value))
}
+ /// Identifies the element (or elements) that describes the object.
fn aria_describedby(
self,
value: V,
@@ -89,6 +101,7 @@ where
self.add_any_attr(aria_describedby(value))
}
+ /// Defines a string value that describes or annotates the current element.
fn aria_description(
self,
value: V,
@@ -97,6 +110,7 @@ where
self.add_any_attr(aria_description(value))
}
+ /// Identifies the element that provides additional information related to the object.
fn aria_details(
self,
value: V,
@@ -104,6 +118,7 @@ where
self.add_any_attr(aria_details(value))
}
+ /// Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
fn aria_disabled(
self,
value: V,
@@ -111,6 +126,7 @@ where
self.add_any_attr(aria_disabled(value))
}
+ /// Indicates what functions can be performed when a dragged object is released on the drop target.
fn aria_dropeffect(
self,
value: V,
@@ -118,6 +134,7 @@ where
self.add_any_attr(aria_dropeffect(value))
}
+ /// Defines the element that provides an error message related to the object.
fn aria_errormessage(
self,
value: V,
@@ -126,6 +143,7 @@ where
self.add_any_attr(aria_errormessage(value))
}
+ /// Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.
fn aria_expanded(
self,
value: V,
@@ -133,6 +151,7 @@ where
self.add_any_attr(aria_expanded(value))
}
+ /// Identifies the next element (or elements) in an alternate reading order of content.
fn aria_flowto(
self,
value: V,
@@ -140,6 +159,7 @@ where
self.add_any_attr(aria_flowto(value))
}
+ /// Indicates an element's "grabbed" state in a drag-and-drop operation.
fn aria_grabbed(
self,
value: V,
@@ -147,6 +167,7 @@ where
self.add_any_attr(aria_grabbed(value))
}
+ /// Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
fn aria_haspopup(
self,
value: V,
@@ -154,6 +175,7 @@ where
self.add_any_attr(aria_haspopup(value))
}
+ /// Indicates whether the element is exposed to an accessibility API.
fn aria_hidden(
self,
value: V,
@@ -161,6 +183,7 @@ where
self.add_any_attr(aria_hidden(value))
}
+ /// Indicates the entered value does not conform to the format expected by the application.
fn aria_invalid(
self,
value: V,
@@ -168,6 +191,7 @@ where
self.add_any_attr(aria_invalid(value))
}
+ /// Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
fn aria_keyshortcuts(
self,
value: V,
@@ -176,6 +200,7 @@ where
self.add_any_attr(aria_keyshortcuts(value))
}
+ /// Defines a string value that labels the current element.
fn aria_label(
self,
value: V,
@@ -183,6 +208,7 @@ where
self.add_any_attr(aria_label(value))
}
+ /// Identifies the element (or elements) that labels the current element.
fn aria_labelledby(
self,
value: V,
@@ -190,6 +216,7 @@ where
self.add_any_attr(aria_labelledby(value))
}
+ /// Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
fn aria_live(
self,
value: V,
@@ -197,6 +224,7 @@ where
self.add_any_attr(aria_live(value))
}
+ /// Indicates whether an element is modal when displayed.
fn aria_modal(
self,
value: V,
@@ -204,6 +232,7 @@ where
self.add_any_attr(aria_modal(value))
}
+ /// Indicates whether a text box accepts multiple lines of input or only a single line.
fn aria_multiline(
self,
value: V,
@@ -211,6 +240,7 @@ where
self.add_any_attr(aria_multiline(value))
}
+ /// Indicates that the user may select more than one item from the current selectable descendants.
fn aria_multiselectable(
self,
value: V,
@@ -219,6 +249,7 @@ where
self.add_any_attr(aria_multiselectable(value))
}
+ /// Indicates whether the element's orientation is horizontal, vertical, or undefined.
fn aria_orientation(
self,
value: V,
@@ -227,6 +258,7 @@ where
self.add_any_attr(aria_orientation(value))
}
+ /// Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
fn aria_owns(
self,
value: V,
@@ -234,6 +266,7 @@ where
self.add_any_attr(aria_owns(value))
}
+ /// Defines a short hint (a word or short phrase) intended to help the user with data entry when the control has no value.
fn aria_placeholder(
self,
value: V,
@@ -242,6 +275,7 @@ where
self.add_any_attr(aria_placeholder(value))
}
+ /// Defines an element's number or position in the current set of listitems or treeitems.
fn aria_posinset(
self,
value: V,
@@ -249,6 +283,7 @@ where
self.add_any_attr(aria_posinset(value))
}
+ /// Indicates the current "pressed" state of toggle buttons.
fn aria_pressed(
self,
value: V,
@@ -256,6 +291,7 @@ where
self.add_any_attr(aria_pressed(value))
}
+ /// Indicates that the element is not editable, but is otherwise operable.
fn aria_readonly(
self,
value: V,
@@ -263,6 +299,7 @@ where
self.add_any_attr(aria_readonly(value))
}
+ /// Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
fn aria_relevant(
self,
value: V,
@@ -270,6 +307,7 @@ where
self.add_any_attr(aria_relevant(value))
}
+ /// Indicates that user input is required on the element before a form may be submitted.
fn aria_required(
self,
value: V,
@@ -277,6 +315,7 @@ where
self.add_any_attr(aria_required(value))
}
+ /// Defines a human-readable, author-localized description for the role of an element.
fn aria_roledescription(
self,
value: V,
@@ -285,6 +324,7 @@ where
self.add_any_attr(aria_roledescription(value))
}
+ /// Defines the total number of rows in a table, grid, or treegrid.
fn aria_rowcount(
self,
value: V,
@@ -292,6 +332,7 @@ where
self.add_any_attr(aria_rowcount(value))
}
+ /// Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
fn aria_rowindex(
self,
value: V,
@@ -299,6 +340,7 @@ where
self.add_any_attr(aria_rowindex(value))
}
+ /// Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
fn aria_rowspan(
self,
value: V,
@@ -306,6 +348,7 @@ where
self.add_any_attr(aria_rowspan(value))
}
+ /// Indicates the current "selected" state of various widgets.
fn aria_selected(
self,
value: V,
@@ -313,6 +356,7 @@ where
self.add_any_attr(aria_selected(value))
}
+ /// Defines the number of items in the current set of listitems or treeitems.
fn aria_setsize(
self,
value: V,
@@ -320,6 +364,7 @@ where
self.add_any_attr(aria_setsize(value))
}
+ /// Indicates if items in a table or grid are sorted in ascending or descending order.
fn aria_sort(
self,
value: V,
@@ -327,6 +372,7 @@ where
self.add_any_attr(aria_sort(value))
}
+ /// Defines the maximum allowed value for a range widget.
fn aria_valuemax(
self,
value: V,
@@ -334,6 +380,7 @@ where
self.add_any_attr(aria_valuemax(value))
}
+ /// Defines the minimum allowed value for a range widget.
fn aria_valuemin(
self,
value: V,
@@ -341,6 +388,7 @@ where
self.add_any_attr(aria_valuemin(value))
}
+ /// Defines the current value for a range widget.
fn aria_valuenow(
self,
value: V,
@@ -348,6 +396,7 @@ where
self.add_any_attr(aria_valuenow(value))
}
+ /// Defines the human-readable text alternative of `aria-valuenow` for a range widget.
fn aria_valuetext(
self,
value: V,
diff --git a/tachys/src/html/attribute/custom.rs b/tachys/src/html/attribute/custom.rs
index a7d61ba18..d681db20f 100644
--- a/tachys/src/html/attribute/custom.rs
+++ b/tachys/src/html/attribute/custom.rs
@@ -6,6 +6,7 @@ use crate::{
};
use std::{borrow::Cow, marker::PhantomData, sync::Arc};
+/// Adds a custom attribute with any key-value combintion.
#[inline(always)]
pub fn custom_attribute(key: K, value: V) -> CustomAttr
where
@@ -20,6 +21,7 @@ where
}
}
+/// A custom attribute with any key-value combination.
#[derive(Debug)]
pub struct CustomAttr
where
@@ -154,7 +156,9 @@ where
}
// TODO this needs to be a method, not a const
+/// Defines a custom attribute key.
pub trait CustomAttributeKey: Clone + AsRef + Send + 'static {
+ /// The attribute name.
const KEY: &'static str;
}
@@ -181,6 +185,7 @@ impl CustomAttributeKey
const KEY: &'static str = K;
}
+/// Adds a custom attribute to an element.
pub trait CustomAttribute
where
K: CustomAttributeKey,
@@ -188,6 +193,7 @@ where
Rndr: DomRenderer,
Self: Sized + AddAnyAttr,
{
+ /// Adds an HTML attribute by key and value.
fn attr(
self,
key: K,
diff --git a/tachys/src/html/attribute/global.rs b/tachys/src/html/attribute/global.rs
index 5f99ca6e0..8dda5dccc 100644
--- a/tachys/src/html/attribute/global.rs
+++ b/tachys/src/html/attribute/global.rs
@@ -13,13 +13,16 @@ use crate::{
};
use core::convert::From;
+/// Adds an attribute that modifies the `class`.
pub trait ClassAttribute
where
C: IntoClass,
Rndr: DomRenderer,
{
+ /// The type of the element with the new attribute added.
type Output;
+ /// Adds a CSS class to an element.
fn class(self, value: C) -> Self::Output;
}
@@ -36,13 +39,16 @@ where
}
}
+/// Adds an attribute that modifies the DOM properties.
pub trait PropAttribute
where
P: IntoProperty,
Rndr: DomRenderer,
{
+ /// The type of the element with the new attribute added.
type Output;
+ /// Adds a DOM property to an element.
fn prop(self, key: K, value: P) -> Self::Output;
}
@@ -54,18 +60,22 @@ where
Rndr: DomRenderer,
{
type Output = >::Output>;
+
fn prop(self, key: K, value: P) -> Self::Output {
self.add_any_attr(prop(key, value))
}
}
+/// Adds an attribute that modifies the CSS styles.
pub trait StyleAttribute
where
S: IntoStyle,
Rndr: DomRenderer,
{
+ /// The type of the element with the new attribute added.
type Output;
+ /// Adds a CSS style to an element.
fn style(self, value: S) -> Self::Output;
}
@@ -82,9 +92,12 @@ where
}
}
+/// Adds an event listener to an element definition.
pub trait OnAttribute {
+ /// The type of the element with the event listener added.
type Output;
+ /// Adds an event listener to an element.
fn on(self, event: E, cb: F) -> Self::Output;
}
@@ -104,9 +117,12 @@ where
}
}
+/// Adds an event listener with a typed target to an element definition.
pub trait OnTargetAttribute {
+ /// The type of the element with the new attribute added.
type Output;
+ /// Adds an event listener with a typed target to an element definition.
fn on_target(self, event: E, cb: F) -> Self::Output;
}
@@ -130,12 +146,14 @@ where
}
}
+/// Global attributes can be added to any HTML element.
pub trait GlobalAttributes
where
Self: Sized + AddAnyAttr,
V: AttributeValue,
Rndr: Renderer,
{
+ /// The `accesskey` global attribute provides a hint for generating a keyboard shortcut for the current element.
fn accesskey(
self,
value: V,
@@ -143,6 +161,7 @@ where
self.add_any_attr(accesskey(value))
}
+ /// The `autocapitalize` global attribute controls whether and how text input is automatically capitalized as it is entered/edited by the user.
fn autocapitalize(
self,
value: V,
@@ -150,6 +169,7 @@ where
self.add_any_attr(autocapitalize(value))
}
+ /// The `autofocus` global attribute is a Boolean attribute indicating that an element should receive focus as soon as the page is loaded.
fn autofocus(
self,
value: V,
@@ -157,6 +177,7 @@ where
self.add_any_attr(autofocus(value))
}
+ /// The `contenteditable` global attribute is an enumerated attribute indicating if the element should be editable by the user.
fn contenteditable(
self,
value: V,
@@ -165,6 +186,7 @@ where
self.add_any_attr(contenteditable(value))
}
+ /// The `dir` global attribute is an enumerated attribute indicating the directionality of the element's text.
fn dir(
self,
value: V,
@@ -172,6 +194,7 @@ where
self.add_any_attr(dir(value))
}
+ /// The `draggable` global attribute is an enumerated attribute indicating whether the element can be dragged.
fn draggable(
self,
value: V,
@@ -179,6 +202,7 @@ where
self.add_any_attr(draggable(value))
}
+ /// The `enterkeyhint` global attribute is used to customize the enter key on virtual keyboards.
fn enterkeyhint(
self,
value: V,
@@ -186,6 +210,7 @@ where
self.add_any_attr(enterkeyhint(value))
}
+ /// The `hidden` global attribute is a Boolean attribute indicating that the element is not yet, or is no longer, relevant.
fn hidden(
self,
value: V,
@@ -193,6 +218,7 @@ where
self.add_any_attr(hidden(value))
}
+ /// The `id` global attribute defines a unique identifier (ID) which must be unique in the whole document.
fn id(
self,
value: V,
@@ -200,6 +226,7 @@ where
self.add_any_attr(id(value))
}
+ /// The `inert` global attribute is a Boolean attribute that makes an element behave inertly.
fn inert(
self,
value: V,
@@ -207,6 +234,7 @@ where
self.add_any_attr(inert(value))
}
+ /// The `inputmode` global attribute provides a hint to browsers for which virtual keyboard to display.
fn inputmode(
self,
value: V,
@@ -214,6 +242,7 @@ where
self.add_any_attr(inputmode(value))
}
+ /// The `is` global attribute allows you to specify that a standard HTML element should behave like a custom built-in element.
fn is(
self,
value: V,
@@ -221,6 +250,7 @@ where
self.add_any_attr(is(value))
}
+ /// The `itemid` global attribute is used to specify the unique, global identifier of an item.
fn itemid(
self,
value: V,
@@ -228,6 +258,7 @@ where
self.add_any_attr(itemid(value))
}
+ /// The `itemprop` global attribute is used to add properties to an item.
fn itemprop(
self,
value: V,
@@ -235,6 +266,7 @@ where
self.add_any_attr(itemprop(value))
}
+ /// The `itemref` global attribute is used to refer to other elements.
fn itemref(
self,
value: V,
@@ -242,6 +274,7 @@ where
self.add_any_attr(itemref(value))
}
+ /// The `itemscope` global attribute is used to create a new item.
fn itemscope(
self,
value: V,
@@ -249,6 +282,7 @@ where
self.add_any_attr(itemscope(value))
}
+ /// The `itemtype` global attribute is used to specify the types of items.
fn itemtype(
self,
value: V,
@@ -256,6 +290,7 @@ where
self.add_any_attr(itemtype(value))
}
+ /// The `lang` global attribute helps define the language of an element.
fn lang(
self,
value: V,
@@ -263,6 +298,7 @@ where
self.add_any_attr(lang(value))
}
+ /// The `nonce` global attribute is used to specify a cryptographic nonce.
fn nonce(
self,
value: V,
@@ -270,6 +306,7 @@ where
self.add_any_attr(nonce(value))
}
+ /// The `part` global attribute identifies the element as a part of a component.
fn part(
self,
value: V,
@@ -277,6 +314,7 @@ where
self.add_any_attr(part(value))
}
+ /// The `popover` global attribute defines the popover's behavior.
fn popover(
self,
value: V,
@@ -284,6 +322,7 @@ where
self.add_any_attr(popover(value))
}
+ /// The `role` global attribute defines the role of an element in ARIA.
fn role(
self,
value: V,
@@ -291,6 +330,7 @@ where
self.add_any_attr(role(value))
}
+ /// The `slot` global attribute assigns a slot in a shadow DOM.
fn slot(
self,
value: V,
@@ -298,6 +338,7 @@ where
self.add_any_attr(slot(value))
}
+ /// The `spellcheck` global attribute is an enumerated attribute that defines whether the element may be checked for spelling errors.
fn spellcheck(
self,
value: V,
@@ -305,6 +346,7 @@ where
self.add_any_attr(spellcheck(value))
}
+ /// The `tabindex` global attribute indicates if the element can take input focus.
fn tabindex(
self,
value: V,
@@ -312,6 +354,7 @@ where
self.add_any_attr(tabindex(value))
}
+ /// The `title` global attribute contains text representing advisory information.
fn title(
self,
value: V,
@@ -319,6 +362,7 @@ where
self.add_any_attr(title(value))
}
+ /// 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.
fn translate(
self,
value: V,
@@ -326,6 +370,7 @@ where
self.add_any_attr(translate(value))
}
+ /// The `virtualkeyboardpolicy` global attribute specifies the behavior of the virtual keyboard.
fn virtualkeyboardpolicy(
self,
value: V,
diff --git a/tachys/src/html/attribute/key.rs b/tachys/src/html/attribute/key.rs
index 493dbb1b3..710685451 100644
--- a/tachys/src/html/attribute/key.rs
+++ b/tachys/src/html/attribute/key.rs
@@ -2,14 +2,18 @@ use super::{Attr, AttributeValue};
use crate::renderer::Renderer;
use std::{fmt::Debug, marker::PhantomData};
+/// An HTML attribute key.
pub trait AttributeKey: Clone + Send + 'static {
+ /// The name of the attribute.
const KEY: &'static str;
}
macro_rules! attributes {
- ($($key:ident $html:literal),* $(,)?) => {
+ ($(#[$meta:meta] $key:ident $html:literal),* $(,)?) => {
paste::paste! {
$(
+ #[$meta]
+ #[track_caller]
pub fn $key(value: V) -> Attr<[<$key:camel>], V, Rndr>
where V: AttributeValue,
Rndr: Renderer
@@ -17,6 +21,7 @@ macro_rules! attributes {
Attr([<$key:camel>], value, PhantomData)
}
+ #[$meta]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct [<$key:camel>];
@@ -28,311 +33,618 @@ macro_rules! attributes {
}
}
-// TODO attribute names with underscores should be kebab-cased
attributes! {
// HTML
- abbr "abbr", // [],
- accept_charset "accept-charset", // [],
- accept "accept", // [],
- accesskey "accesskey", // [], // [GlobalAttribute]
- action "action", // [],
- align "align", // [],
- allow "allow", // [],
- allowfullscreen "allowfullscreen", // [],
- allowpaymentrequest "allowpaymentrequest", // [],
- alt "alt", // [],
+ /// The `abbr` attribute specifies an abbreviated form of the element's content.
+ abbr "abbr",
+ /// The `accept-charset` attribute specifies the character encodings that are to be used for the form submission.
+ accept_charset "accept-charset",
+ /// The `accept` attribute specifies a list of types the server accepts, typically a file type.
+ accept "accept",
+ /// The `accesskey` attribute specifies a shortcut key to activate or focus an element.
+ accesskey "accesskey",
+ /// The `action` attribute defines the URL to which the form data will be sent.
+ action "action",
+ /// The `align` attribute specifies the alignment of an element.
+ align "align",
+ /// The `allow` attribute defines a feature policy for the content in an iframe.
+ allow "allow",
+ /// The `allowfullscreen` attribute allows the iframe to be displayed in fullscreen mode.
+ allowfullscreen "allowfullscreen",
+ /// The `allowpaymentrequest` attribute allows a cross-origin iframe to invoke the Payment Request API.
+ allowpaymentrequest "allowpaymentrequest",
+ /// The `alt` attribute provides alternative text for an image, if the image cannot be displayed.
+ alt "alt",
// ARIA
+ /// The `aria-activedescendant` attribute identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.
aria_activedescendant "aria-activedescendant",
- aria_atomic "aria-atomic", // [], // [GlobalAttribute] // [AriaAttribute],
+ /// The `aria-atomic` attribute indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.
+ aria_atomic "aria-atomic",
+ /// The `aria-autocomplete` attribute indicates whether user input completion suggestions are provided.
aria_autocomplete "aria-autocomplete",
- aria_busy "aria-busy", // [], // [GlobalAttribute] // [AriaAttribute],
+ /// The `aria-busy` attribute indicates whether an element, and its subtree, are currently being updated.
+ aria_busy "aria-busy",
+ /// The `aria-checked` attribute indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
aria_checked "aria-checked",
+ /// The `aria-colcount` attribute defines the total number of columns in a table, grid, or treegrid.
aria_colcount "aria-colcount",
+ /// The `aria-colindex` attribute defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
aria_colindex "aria-colindex",
+ /// The `aria-colspan` attribute defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
aria_colspan "aria-colspan",
- aria_controls "aria-controls", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_current "aria-current", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_describedby "aria-describedby", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_description "aria-description", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_details "aria-details", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_disabled "aria-disabled", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_dropeffect "aria-dropeffect", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_errormessage "aria-errormessage", // [], // [GlobalAttribute] // [AriaAttribute],
+ /// The `aria-controls` attribute identifies the element (or elements) whose contents or presence are controlled by the current element.
+ aria_controls "aria-controls",
+ /// The `aria-current` attribute indicates the element representing the current item within a container or set of related elements.
+ aria_current "aria-current",
+ /// The `aria-describedby` attribute identifies the element (or elements) that describes the object.
+ aria_describedby "aria-describedby",
+ /// The `aria-description` attribute provides a string value that describes or annotates the current element.
+ aria_description "aria-description",
+ /// The `aria-details` attribute identifies the element that provides a detailed, extended description for the object.
+ aria_details "aria-details",
+ /// The `aria-disabled` attribute indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
+ aria_disabled "aria-disabled",
+ /// The `aria-dropeffect` attribute indicates what functions can be performed when a dragged object is released on the drop target.
+ aria_dropeffect "aria-dropeffect",
+ /// The `aria-errormessage` attribute identifies the element that provides an error message for the object.
+ aria_errormessage "aria-errormessage",
+ /// The `aria-expanded` attribute indicates whether an element, or another grouping element it controls, is currently expanded or collapsed.
aria_expanded "aria-expanded",
- aria_flowto "aria-flowto", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_grabbed "aria-grabbed", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_haspopup "aria-haspopup", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_hidden "aria-hidden", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_invalid "aria-invalid", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_keyshortcuts "aria-keyshortcuts", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_label "aria-label", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_labelledby "aria-labelledby", // [], // [GlobalAttribute] // [AriaAttribute],
- aria_live "aria-live", // [], // [GlobalAttribute] // [AriaAttribute],
+ /// The `aria-flowto` attribute identifies the next element (or elements) in an alternate reading order of content.
+ aria_flowto "aria-flowto",
+ /// The `aria-grabbed` attribute indicates an element's "grabbed" state in a drag-and-drop operation.
+ aria_grabbed "aria-grabbed",
+ /// The `aria-haspopup` attribute indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.
+ aria_haspopup "aria-haspopup",
+ /// The `aria-hidden` attribute indicates whether the element is exposed to an accessibility API.
+ aria_hidden "aria-hidden",
+ /// The `aria-invalid` attribute indicates the entered value does not conform to the format expected by the application.
+ aria_invalid "aria-invalid",
+ /// The `aria-keyshortcuts` attribute indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.
+ aria_keyshortcuts "aria-keyshortcuts",
+ /// The `aria-label` attribute defines a string value that labels the current element.
+ aria_label "aria-label",
+ /// The `aria-labelledby` attribute identifies the element (or elements) that labels the current element.
+ aria_labelledby "aria-labelledby",
+ /// The `aria-live` attribute indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.
+ aria_live "aria-live",
+ /// The `aria-modal` attribute indicates whether an element is modal when displayed.
aria_modal "aria-modal",
+ /// The `aria-multiline` attribute indicates whether a text box accepts multiple lines of input or only a single line.
aria_multiline "aria-multiline",
+ /// The `aria-multiselectable` attribute indicates that the user may select more than one item from the current selectable descendants.
aria_multiselectable "aria-multiselectable",
+ /// The `aria-orientation` attribute indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.
aria_orientation "aria-orientation",
- aria_owns "aria-owns", // [], // [GlobalAttribute] // [AriaAttribute],
+ /// The `aria-owns` attribute identifies an element (or elements) in order to define a relationship between the element with `aria-owns` and the target element.
+ aria_owns "aria-owns",
+ /// The `aria-placeholder` attribute defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
aria_placeholder "aria-placeholder",
+ /// The `aria-posinset` attribute defines an element's position within a set or treegrid.
aria_posinset "aria-posinset",
+ /// The `aria-pressed` attribute indicates the current "pressed" state of toggle buttons.
aria_pressed "aria-pressed",
+ /// The `aria-readonly` attribute indicates that the element is not editable, but is otherwise operable.
aria_readonly "aria-readonly",
- aria_relevant "aria-relevant", // [], // [GlobalAttribute] // [AriaAttribute],
+ /// The `aria-relevant` attribute indicates what user agent changes to the accessibility tree should be monitored.
+ aria_relevant "aria-relevant",
+ /// The `aria-required` attribute indicates that user input is required on the element before a form may be submitted.
aria_required "aria-required",
- aria_roledescription "aria-roledescription", // [], // [GlobalAttribute] // [AriaAttribute],
+ /// The `aria-roledescription` attribute defines a human-readable, author-localized description for the role of an element.
+ aria_roledescription "aria-roledescription",
+ /// The `aria-rowcount` attribute defines the total number of rows in a table, grid, or treegrid.
aria_rowcount "aria-rowcount",
+ /// The `aria-rowindex` attribute defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
aria_rowindex "aria-rowindex",
+ /// The `aria-rowspan` attribute defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
aria_rowspan "aria-rowspan",
+ /// The `aria-selected` attribute indicates the current "selected" state of various widgets.
aria_selected "aria-selected",
+ /// The `aria-setsize` attribute defines the number of items in the current set of listitems or treeitems.
aria_setsize "aria-setsize",
+ /// The `aria-sort` attribute indicates if items in a table or grid are sorted in ascending or descending order.
aria_sort "aria-sort",
+ /// The `aria-valuemax` attribute defines the maximum allowed value for a range widget.
aria_valuemax "aria-valuemax",
+ /// The `aria-valuemin` attribute defines the minimum allowed value for a range widget.
aria_valuemin "aria-valuemin",
+ /// The `aria-valuenow` attribute defines the current value for a range widget.
aria_valuenow "aria-valuenow",
+ /// The `aria-valuetext` attribute defines the human-readable text alternative of aria-valuenow for a range widget.
aria_valuetext "aria-valuetext",
- r#as "as", // [],
- r#async "async", // [],
- autocapitalize "autocapitalize", // [], // [GlobalAttribute]
- autocomplete "autocomplete", // [],
- autofocus "autofocus", // [], // [GlobalAttribute]
- autoplay "autoplay", // [],
- background "background", // [],
- bgcolor "bgcolor", // [],
- blocking "blocking", // [],
- border "border", // [],
- buffered "buffered", // [],
- capture "capture", // [],
- challenge "challenge", // [],
- charset "charset", // [],
- checked "checked", // [],
- cite "cite", // [],
+ /// The `as` attribute specifies the type of destination for the content of the link.
+ r#as "as",
+ /// The `async` attribute indicates that the script should be executed asynchronously.
+ r#async "async",
+ /// The `autocapitalize` attribute controls whether and how text input is automatically capitalized as it is entered/edited by the user.
+ autocapitalize "autocapitalize",
+ /// The `autocomplete` attribute indicates whether an input field can have its value automatically completed by the browser.
+ autocomplete "autocomplete",
+ /// The `autofocus` attribute indicates that an element should be focused on page load.
+ autofocus "autofocus",
+ /// The `autoplay` attribute indicates that the media should start playing as soon as it is loaded.
+ autoplay "autoplay",
+ /// The `background` attribute sets the URL of the background image for the document.
+ background "background",
+ /// The `bgcolor` attribute sets the background color of an element.
+ bgcolor "bgcolor",
+ /// The `blocking` attribute indicates that the script will block the page loading until it is executed.
+ blocking "blocking",
+ /// The `border` attribute sets the width of an element's border.
+ border "border",
+ /// The `buffered` attribute contains the time ranges that the media has been buffered.
+ buffered "buffered",
+ /// The `capture` attribute indicates that the user must capture media using a camera or microphone instead of selecting a file from the file picker.
+ capture "capture",
+ /// The `challenge` attribute specifies the challenge string that is paired with the keygen element.
+ challenge "challenge",
+ /// The `charset` attribute specifies the character encoding of the HTML document.
+ charset "charset",
+ /// The `checked` attribute indicates whether an input element is checked or not.
+ checked "checked",
+ /// The `cite` attribute contains a URL that points to the source of the quotation or change.
+ cite "cite",
// class is handled in ../class.rs instead
- //class "class", // [],
- code "code", // [],
- color "color", // [],
- cols "cols", // [],
- colspan "colspan", // [],
- content "content", // [],
- contenteditable "contenteditable", // [], // [GlobalAttribute]
- contextmenu "contextmenu", // [], // [GlobalAttribute]
- controls "controls", // [],
- controlslist "controlslist", // [],
- coords "coords", // [],
- crossorigin "crossorigin", // [],
- csp "csp", // [],
- data "data", // [],
- datetime "datetime", // [],
- decoding "decoding", // [],
- default "default", // [],
- defer "defer", // [],
- dir "dir", // [], // [GlobalAttribute]
- dirname "dirname", // [],
- disabled "disabled", // [],
- disablepictureinpicture "disablepictureinpicture", // [],
- disableremoteplayback "disableremoteplayback", // [],
- download "download", // [],
- draggable "draggable", // [], // [GlobalAttribute]
- enctype "enctype", // [],
- enterkeyhint "enterkeyhint", // [], // [GlobalAttribute]
- exportparts "exportparts", // [], // [GlobalAttribute]
- fetchpriority "fetchprioty", // [],
- r#for "for", // [],
- form "form", // [],
- formaction "formaction", // [],
- formenctype "formenctype", // [],
- formmethod "formmethod", // [],
- formnovalidate "formnovalidate", // [],
- formtarget "formtarget", // [],
- headers "headers", // [],
- height "height", // [],
- hidden "hidden", // [], // [GlobalAttribute]
- high "high", // [],
- href "href", // [],
- hreflang "hreflang", // [],
- http_equiv "http-equiv", // [],
- icon "icon", // [],
- id "id", // [], // [GlobalAttribute]
+ //class "class",
+ /// The `code` attribute specifies the URL of the applet's class file to be loaded and executed.
+ code "code",
+ /// The `color` attribute specifies the color of an element's text.
+ color "color",
+ /// The `cols` attribute specifies the visible width of a text area.
+ cols "cols",
+ /// The `colspan` attribute defines the number of columns a cell should span.
+ colspan "colspan",
+ /// The `content` attribute gives the value associated with the http-equiv or name attribute.
+ content "content",
+ /// The `contenteditable` attribute indicates whether the element's content is editable.
+ contenteditable "contenteditable",
+ /// The `contextmenu` attribute specifies the ID of a `