attributes(_:when:)

Adds the specified attributes to the element.

Html+Attributes.swift:102
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.