| OLD | NEW |
| 1 library html; | 1 library html; |
| 2 | 2 |
| 3 import 'dart:async'; | 3 import 'dart:async'; |
| 4 import 'dart:collection'; | 4 import 'dart:collection'; |
| 5 import 'dart:collection-dev'; | |
| 6 import 'dart:html_common'; | 5 import 'dart:html_common'; |
| 7 import 'dart:indexed_db'; | 6 import 'dart:indexed_db'; |
| 8 import 'dart:isolate'; | 7 import 'dart:isolate'; |
| 9 import 'dart:json' as json; | 8 import 'dart:json' as json; |
| 10 import 'dart:math'; | 9 import 'dart:math'; |
| 11 import 'dart:svg' as svg; | 10 import 'dart:svg' as svg; |
| 12 import 'dart:web_audio' as web_audio; | 11 import 'dart:web_audio' as web_audio; |
| 13 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 12 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 14 // for details. All rights reserved. Use of this source code is governed by a | 13 // for details. All rights reserved. Use of this source code is governed by a |
| 15 // BSD-style license that can be found in the LICENSE file. | 14 // BSD-style license that can be found in the LICENSE file. |
| (...skipping 17474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17490 Node namedItem(String name) native; | 17489 Node namedItem(String name) native; |
| 17491 | 17490 |
| 17492 @DocsEditable @DomName('HTMLSelectElement.setCustomValidity') | 17491 @DocsEditable @DomName('HTMLSelectElement.setCustomValidity') |
| 17493 void setCustomValidity(String error) native; | 17492 void setCustomValidity(String error) native; |
| 17494 | 17493 |
| 17495 | 17494 |
| 17496 // Override default options, since IE returns SelectElement itself and it | 17495 // Override default options, since IE returns SelectElement itself and it |
| 17497 // does not operate as a List. | 17496 // does not operate as a List. |
| 17498 List<OptionElement> get options { | 17497 List<OptionElement> get options { |
| 17499 var options = this.children.where((e) => e is OptionElement).toList(); | 17498 var options = this.children.where((e) => e is OptionElement).toList(); |
| 17500 return new ListView(options, 0, options.length); | 17499 // TODO(floitsch): find better way to create a read-only list view. |
| 17500 return options.take(options.length); |
| 17501 } | 17501 } |
| 17502 | 17502 |
| 17503 List<OptionElement> get selectedOptions { | 17503 List<OptionElement> get selectedOptions { |
| 17504 // IE does not change the selected flag for single-selection items. | 17504 // IE does not change the selected flag for single-selection items. |
| 17505 if (this.multiple) { | 17505 if (this.multiple) { |
| 17506 var options = this.options.where((o) => o.selected).toList(); | 17506 var options = this.options.where((o) => o.selected).toList(); |
| 17507 return new ListView(options, 0, options.length); | 17507 // TODO(floitsch): find better way to create a read-only list view. |
| 17508 return options.take(options.length); |
| 17508 } else { | 17509 } else { |
| 17509 return [this.options[this.selectedIndex]]; | 17510 return [this.options[this.selectedIndex]]; |
| 17510 } | 17511 } |
| 17511 } | 17512 } |
| 17512 } | 17513 } |
| 17513 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 17514 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 17514 // for details. All rights reserved. Use of this source code is governed by a | 17515 // for details. All rights reserved. Use of this source code is governed by a |
| 17515 // BSD-style license that can be found in the LICENSE file. | 17516 // BSD-style license that can be found in the LICENSE file. |
| 17516 | 17517 |
| 17517 | 17518 |
| (...skipping 11831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 29349 _position = nextPosition; | 29350 _position = nextPosition; |
| 29350 return true; | 29351 return true; |
| 29351 } | 29352 } |
| 29352 _current = null; | 29353 _current = null; |
| 29353 _position = _array.length; | 29354 _position = _array.length; |
| 29354 return false; | 29355 return false; |
| 29355 } | 29356 } |
| 29356 | 29357 |
| 29357 T get current => _current; | 29358 T get current => _current; |
| 29358 } | 29359 } |
| OLD | NEW |