getElementAttributeStr function
Returns element attribute with String key.
Implementation
String? getElementAttributeStr(Element element, String key) {
// `Element.getAttribute()` is case-insensitive
var val = element.getAttribute(key);
return val;
}