setAttr method
Sets an attribute on the element.
If value is null, the attribute is removed.
Implementation
void setAttr(String name, String? value) {
if (_element == null) return;
if (value == null) {
_element!.removeAttribute(name);
} else {
_element!.setAttribute(name, value);
}
}