detectHtmlElementFromTagName function

bool detectHtmlElementFromTagName(
  1. String tagName
)

Returns true if tag name is HtmlElement.

Returns false if tag name is svg element or other. Used for optimizations. Should not generate false positives but returning false when unknown is fine since code will fallback to general Element case.

Implementation

bool detectHtmlElementFromTagName(String tagName) =>
    _htmlTagNames.contains(tagName);