public hasAttribute(name as String) as Boolean
Indicates whether an attribute exists by name.
True when the attribute exists.
print(element.hasAttribute("id"))