4a7dfd2da3
Review URL: https://codereview.chromium.org//11783009 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
26 lines
808 B
Plaintext
26 lines
808 B
Plaintext
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
part of html;
|
|
|
|
/// @domName $DOMNAME
|
|
class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
|
|
$!MEMBERS
|
|
|
|
// Override default options, since IE returns SelectElement itself and it
|
|
// does not operate as a List.
|
|
List<OptionElement> get options {
|
|
return this.children.where((e) => e is OptionElement).toList();
|
|
}
|
|
|
|
List<OptionElement> get selectedOptions {
|
|
// IE does not change the selected flag for single-selection items.
|
|
if (this.multiple) {
|
|
return this.options.where((o) => o.selected).toList();
|
|
} else {
|
|
return [this.options[this.selectedIndex]];
|
|
}
|
|
}
|
|
}
|