addAttribute
Element type.
Object with attributes to add.
StoreMap type when used reactively.
Attributes or store and mapper function
Utility function for adding attributes
Adds attributes to an element. Supports reactive attributes when using stores.
const addTitle = addAttribute<HTMLDivElement, { title: string }>( { title: "Hello" })(MyElement); Copy
const addTitle = addAttribute<HTMLDivElement, { title: string }>( { title: "Hello" })(MyElement);
addAttribute