getElementHREF function
Returns href
value for different Element types.
Implementation
String? getElementHREF(Element element) {
if (element is LinkElement) return element.href;
if (element is AnchorElement) return element.href;
if (element is BaseElement) return element.href;
if (element is AreaElement) return element.href;
return null;
}