isElementWithSRC function

bool isElementWithSRC(
  1. Element element
)

Returns true if element type can have src attribute.

Implementation

bool isElementWithSRC(Element element) {
  if (element is ImageElement) return true;
  if (element is ScriptElement) return true;
  if (element is InputElement) return true;

  if (element is MediaElement) return true;
  if (element is EmbedElement) return true;

  if (element is IFrameElement) return true;
  if (element is SourceElement) return true;
  if (element is TrackElement) return true;

  if (element is ImageButtonInputElement) return true;

  return false;
}