attr(_:)

Get an attribute value from the first matched element that has the attribute.

Elements.swift:54
func attr(_ attributeKey: String) throws -> String
<param>
<return>

or if the no elements have the attribute, returns empty string.

<see>