attrIfNotSet

fun <N : Element> Tag<N>.attrIfNotSet(name: String, value: String)

Sets an attribute only if it is not present yet.

This is intended only for attributes, that have a static character, like an ARIA "role" for example. It enables a client to overrule a default attribute set by some component, if the latter uses this defensive function to set its default attribute.

Parameters

name

to use

value

to use