selectOption method

OPTIONElement? selectOption(
  1. Object? option, [
  2. bool selected = true
])

Implementation

OPTIONElement? selectOption(Object? option, [bool selected = true]) {
  var elem = getOption(option);

  if (elem != null) {
    elem.selected = selected;
    return elem;
  }

  return null;
}