Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: lib/html/dart2js/html_dart2js.dart

Side-by-side diff isn't available for this file because of its large size.
Issue 11035032: Fixing SelectElement.selectedOptions to work on all platforms. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Moved selectelement.darttemplate. Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | lib/html/scripts/systemhtml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html/dart2js/html_dart2js.dart
diff --git a/lib/html/dart2js/html_dart2js.dart b/lib/html/dart2js/html_dart2js.dart
index daf6e9f2bd4d3297f67c603f436870f009198038..8fd7c988a789e23833e15060d8ab50e5d7926fa6 100644
--- a/lib/html/dart2js/html_dart2js.dart
+++ b/lib/html/dart2js/html_dart2js.dart
@@ -30228,6 +30228,9 @@ abstract class SelectElement implements Element {
/** @domName HTMLSelectElement.setCustomValidity */
void setCustomValidity(String error);
}
+// 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.
class _SelectElementImpl extends _ElementImpl implements SelectElement native "*HTMLSelectElement" {
@@ -30251,8 +30254,6 @@ class _SelectElementImpl extends _ElementImpl implements SelectElement native "*
int selectedIndex;
- final _HTMLCollectionImpl selectedOptions;
-
int size;
final String type;
@@ -30272,6 +30273,11 @@ class _SelectElementImpl extends _ElementImpl implements SelectElement native "*
_NodeImpl namedItem(String name) native;
void setCustomValidity(String error) native;
+
+
+ List<OptionElement> get selectedOptions() {
+ return this.options.filter((o) => o.selected);
+ }
}
// 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
« no previous file with comments | « no previous file | lib/html/scripts/systemhtml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698