#[derive(DeriveElement)]
{
// Attributes available to this derive:
#[element]
}
Expand description
Derive Node, ContainerNode, and Element traits for an element type.
Use this for element node types that can have children, attributes, and element-specific data.
§Attributes
tag = "..."— (required) the HTML tag namefocusable— mark the element as focusable by defaultdata = TypeName— the element-specific data type (default:())
§Example
ⓘ
#[derive(Copy, Clone, Element)]
#[element(tag = "button", focusable, data = ButtonData)]
pub struct Button(Handle);