startTagOptgroup method

void startTagOptgroup(
  1. StartTagToken token
)

Implementation

void startTagOptgroup(StartTagToken token) {
  if (tree.openElements.last.localName == 'option') {
    tree.openElements.removeLast();
  }
  if (tree.openElements.last.localName == 'optgroup') {
    tree.openElements.removeLast();
  }
  tree.insertElement(token);
}