Instance Methodsliemeobn.elementary 0.5.0Elementary
attributes(_:when:)
Adds the specified attributes to the element.
func attributes(_ attributes: HTMLAttribute<Tag>..., when condition: Bool = true) -> _AttributedElement<Self>
Parameters
- attributes
The attributes to add to the element.
- condition
If set to false, the attributes will not be added.
Returns
A new element with the specified attributes added.