getSelectionScript method

  1. @override
String getSelectionScript()
override

Implementation

@override
String getSelectionScript() {
  return '''
    var options = element.options;
    for (var i = 0; i < options.length; i++) {
      if (options[i].text.trim() === "$text") {
        element.selectedIndex = i;
        break;
      }
    }
  ''';
}