endTagForm method

void endTagForm(
  1. EndTagToken token
)

Implementation

void endTagForm(EndTagToken token) {
  final node = tree.formPointer;
  tree.formPointer = null;
  if (node == null || !tree.elementInScope(node)) {
    parser.parseError(token.span, 'unexpected-end-tag', {'name': 'form'});
  } else {
    tree.generateImpliedEndTags();
    if (tree.openElements.last != node) {
      parser.parseError(
          token.span, 'end-tag-too-early-ignored', {'name': 'form'});
    }
    tree.openElements.remove(node);
    node.endSourceSpan = token.span;
  }
}