Index: sdk/lib/html/dart2js/html_dart2js.dart |
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart |
index 2f296beed173c1c65a9d56f4d9dd3719923301de..ac0b4eab33fff2cabb8ff40a4f0eb90e9ce472dc 100644 |
--- a/sdk/lib/html/dart2js/html_dart2js.dart |
+++ b/sdk/lib/html/dart2js/html_dart2js.dart |
@@ -16548,13 +16548,15 @@ class SelectElement extends Element native "*HTMLSelectElement" { |
// 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(); |
+ var options = this.children.where((e) => e is OptionElement).toList(); |
+ return new ListView<OptionElement>(options, 0, options.length); |
} |
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(); |
+ var options = this.options.where((o) => o.selected).toList(); |
+ return new ListView<OptionElement>(options, 0, options.length); |
} else { |
return [this.options[this.selectedIndex]]; |
} |