getAttribute

fun getAttribute(qualifiedName: String): String?(source)

Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.

MDN Reference