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

Side by Side Diff: sdk/lib/html/templates/html/dart2js/impl_SelectElement.darttemplate

Issue 11407002: Adding 'part of html' to all files which are used by dart:html. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of html;
6
5 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { 7 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
6 $!MEMBERS 8 $!MEMBERS
7 9
8 // Override default options, since IE returns SelectElement itself and it 10 // Override default options, since IE returns SelectElement itself and it
9 // does not operate as a List. 11 // does not operate as a List.
10 List<OptionElement> get options { 12 List<OptionElement> get options {
11 return this.elements.filter((e) => e is OptionElement); 13 return this.elements.filter((e) => e is OptionElement);
12 } 14 }
13 15
14 List<OptionElement> get selectedOptions { 16 List<OptionElement> get selectedOptions {
15 // IE does not change the selected flag for single-selection items. 17 // IE does not change the selected flag for single-selection items.
16 if (this.multiple) { 18 if (this.multiple) {
17 return this.options.filter((o) => o.selected); 19 return this.options.filter((o) => o.selected);
18 } else { 20 } else {
19 return [this.options[this.selectedIndex]]; 21 return [this.options[this.selectedIndex]];
20 } 22 }
21 } 23 }
22 } 24 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698