🔗 Function: setAttribute()
setAttribute<
P,E>(name,reactive):Effect<P,E>
Defined in: src/lib/effects.ts:392
Effect for setting an attribute on an element.
Sets the specified attribute with security validation for unsafe values.
🔗 Type Parameters
🔗 P
P extends ComponentProps
🔗 E
E extends Element = HTMLElement
🔗 Parameters
🔗 name
string
Name of the attribute to set
🔗 reactive
Reactive<string, P, E> = name
Reactive value bound to the attribute value (defaults to attribute name)
🔗 Returns
Effect<P, E>
Effect function that sets the attribute on the element
🔗 Since
0.8.0