Checks if the element has the specified attribute.
Returns false if not hydrated or running on server.
bool hasAttr(String name) { return _element?.hasAttribute(name) ?? false; }