isElementWithHREF function

bool isElementWithHREF(
  1. Element element
)

Returns true if element type can have href attribute.

Implementation

bool isElementWithHREF(Element element) {
  if (element.isA<HTMLLinkElement>()) return true;
  if (element.isA<HTMLAnchorElement>()) return true;
  if (element.isA<HTMLBaseElement>()) return true;
  if (element.isA<HTMLAreaElement>()) return true;

  return false;
}