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 $ANNOTATIONS | 6 $ANNOTATIONS |
7 class $CLASSNAME$EXTENDS implements | 7 class $CLASSNAME$EXTENDS implements |
8 HiddenInputElement, | 8 HiddenInputElement, |
9 SearchInputElement, | 9 SearchInputElement, |
10 TextInputElement, | 10 TextInputElement, |
(...skipping 11 matching lines...) Expand all Loading... |
22 RangeInputElement, | 22 RangeInputElement, |
23 CheckboxInputElement, | 23 CheckboxInputElement, |
24 RadioButtonInputElement, | 24 RadioButtonInputElement, |
25 FileUploadInputElement, | 25 FileUploadInputElement, |
26 SubmitButtonInputElement, | 26 SubmitButtonInputElement, |
27 ImageButtonInputElement, | 27 ImageButtonInputElement, |
28 ResetButtonInputElement, | 28 ResetButtonInputElement, |
29 ButtonInputElement | 29 ButtonInputElement |
30 $NATIVESPEC { | 30 $NATIVESPEC { |
31 | 31 |
32 /// @docsEditable true | |
33 factory InputElement({String type}) { | 32 factory InputElement({String type}) { |
34 var e = document.$dom_createElement("input"); | 33 var e = document.$dom_createElement("input"); |
35 if (type != null) { | 34 if (type != null) { |
36 try { | 35 try { |
37 // IE throws an exception for unknown types. | 36 // IE throws an exception for unknown types. |
38 e.type = type; | 37 e.type = type; |
39 } catch(_) {} | 38 } catch(_) {} |
40 } | 39 } |
41 return e; | 40 return e; |
42 } | 41 } |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 factory ResetButtonInputElement() => new InputElement(type: 'reset'); | 616 factory ResetButtonInputElement() => new InputElement(type: 'reset'); |
618 } | 617 } |
619 | 618 |
620 /** | 619 /** |
621 * A button, with no default behavior. | 620 * A button, with no default behavior. |
622 */ | 621 */ |
623 abstract class ButtonInputElement implements InputElementBase { | 622 abstract class ButtonInputElement implements InputElementBase { |
624 factory ButtonInputElement() => new InputElement(type: 'button'); | 623 factory ButtonInputElement() => new InputElement(type: 'button'); |
625 } | 624 } |
626 | 625 |
OLD | NEW |