createSpan function

SpanElement createSpan([
  1. String? html,
  2. NodeValidator? validator
])

Creates a span element.

html The HTML to parse as content.

Implementation

SpanElement createSpan([String? html, NodeValidator? validator]) {
  var span = SpanElement();

  if (html != null) {
    setElementInnerHTML(span, html, validator: validator);
  }

  return span;
}