Checks if the element has the specified attribute.
bool hasAttr(String name) { return _element?.hasAttribute(name) ?? false; }