#![allow(non_upper_case_globals)] use crate::AttributeDiscription; macro_rules! trait_methods { ( @base $(#[$trait_attr:meta])* $trait:ident; $( $(#[$attr:meta])* $name:ident $(: $($arg:literal),*)*; )+ ) => { $(#[$trait_attr])* pub trait $trait { $( $(#[$attr])* const $name: AttributeDiscription = trait_methods! { $name $(: $($arg),*)*; }; )* } }; // Rename the incoming ident and apply a custom namespace ( $name:ident: $lit:literal, $ns:literal; ) => { ($lit, Some($ns), false) }; // Rename the incoming ident ( $name:ident: $lit:literal; ) => { ($lit, None, false ) }; // Don't rename the incoming ident ( $name:ident; ) => { (stringify!($name), None, false) }; } trait_methods! { @base GlobalAttributes; /// Prevent the default action for this element. /// /// For more information, see the MDN docs: /// prevent_default: "dioxus-prevent-default"; /// accesskey: "accesskey"; /// autocapitalize: "autocapitalize"; /// autofocus; /// The HTML class attribute is used to specify a class for an HTML element. /// /// ## Details /// Multiple HTML elements can share the same class. /// /// The class global attribute is a space-separated list of the case-sensitive classes of the element. /// Classes allow CSS and Javascript to select and access specific elements via the class selectors or /// functions like the DOM method document.getElementsByClassName. /// /// ## Example /// /// ### HTML: /// ```html ///

Above point sounds a bit obvious. Remove/rewrite?

/// ``` /// /// ### CSS: /// ```css /// .note { /// font-style: italic; /// font-weight: bold; /// } /// /// .editorial { /// background: rgb(255, 0, 0, .25); /// padding: 10px; /// } /// ``` /// class; /// contenteditable; /// data; /// dir; /// draggable; /// enterkeyhint; /// exportparts; ///