OLD | NEW |
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 $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
6 | 6 |
7 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS implements | 7 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS implements |
8 HiddenInputElement, | 8 HiddenInputElement, |
9 SearchInputElement, | 9 SearchInputElement, |
10 TextInputElement, | 10 TextInputElement, |
11 UrlInputElement, | 11 UrlInputElement, |
12 TelephoneInputElement, | 12 TelephoneInputElement, |
13 EmailInputElement, | 13 EmailInputElement, |
14 PasswordInputElement, | 14 PasswordInputElement, |
15 DateInputElement, | 15 DateInputElement, |
16 MonthInputElement, | 16 MonthInputElement, |
17 WeekInputElement, | 17 WeekInputElement, |
18 TimeInputElement, | 18 TimeInputElement, |
19 LocalDateTimeInputElement, | 19 LocalDateTimeInputElement, |
20 NumberInputElement, | 20 NumberInputElement, |
21 RangeInputElement, | 21 RangeInputElement, |
22 CheckboxInputElement, | 22 CheckboxInputElement, |
23 RadioButtonInputElement, | 23 RadioButtonInputElement, |
24 FileUploadInputElement, | 24 FileUploadInputElement, |
25 SubmitButtonInputElement, | 25 SubmitButtonInputElement, |
26 ImageButtonInputElement, | 26 ImageButtonInputElement, |
27 ResetButtonInputElement, | 27 ResetButtonInputElement, |
28 ButtonInputElement { | 28 ButtonInputElement |
| 29 $NATIVESPEC { |
29 | 30 |
30 factory InputElement({String type}) { | 31 factory InputElement({String type}) { |
31 var e = document.createElement("input"); | 32 var e = document.createElement("input"); |
32 if (type != null) { | 33 if (type != null) { |
33 try { | 34 try { |
34 // IE throws an exception for unknown types. | 35 // IE throws an exception for unknown types. |
35 e.type = type; | 36 e.type = type; |
36 } catch(_) {} | 37 } catch(_) {} |
37 } | 38 } |
38 return e; | 39 return e; |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 abstract class ResetButtonInputElement implements InputElementBase { | 589 abstract class ResetButtonInputElement implements InputElementBase { |
589 factory ResetButtonInputElement() => new InputElement(type: 'reset'); | 590 factory ResetButtonInputElement() => new InputElement(type: 'reset'); |
590 } | 591 } |
591 | 592 |
592 /** | 593 /** |
593 * A button, with no default behavior. | 594 * A button, with no default behavior. |
594 */ | 595 */ |
595 abstract class ButtonInputElement implements InputElementBase { | 596 abstract class ButtonInputElement implements InputElementBase { |
596 factory ButtonInputElement() => new InputElement(type: 'button'); | 597 factory ButtonInputElement() => new InputElement(type: 'button'); |
597 } | 598 } |
| 599 |
OLD | NEW |