startTagHtml method

Token? startTagHtml(
  1. StartTagToken token
)

Implementation

Token? startTagHtml(StartTagToken token) {
  if (parser.firstStartTag == false && token.name == 'html') {
    parser.parseError(token.span, 'non-html-root');
  }
  // XXX Need a check here to see if the first start tag token emitted is
  // this token... If it's not, invoke parser.parseError().
  tree.openElements[0].sourceSpan = token.span;
  token.data.forEach((attr, value) {
    tree.openElements[0].attributes.putIfAbsent(attr, () => value);
  });
  parser.firstStartTag = false;
  return null;
}