| 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)class $CLASSNAME$EXTENDS implements | 7 $(ANNOTATIONS)class $CLASSNAME$EXTENDS implements |
| 8 HiddenInputElement, | 8 HiddenInputElement, |
| 9 SearchInputElement, | 9 SearchInputElement, |
| 10 TextInputElement, | 10 TextInputElement, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 e.type = type; | 36 e.type = type; |
| 37 } catch(_) {} | 37 } catch(_) {} |
| 38 } | 38 } |
| 39 return e; | 39 return e; |
| 40 } | 40 } |
| 41 $!MEMBERS | 41 $!MEMBERS |
| 42 } | 42 } |
| 43 | 43 |
| 44 | 44 |
| 45 // Interfaces representing the InputElement APIs which are supported | 45 // Interfaces representing the InputElement APIs which are supported |
| 46 // for the various types of InputElement. | 46 // for the various types of InputElement. From: |
| 47 // From http://dev.w3.org/html5/spec/the-input-element.html#the-input-element. | 47 // http://www.w3.org/html/wg/drafts/html/master/forms.html#the-input-element. |
| 48 | 48 |
| 49 /** | 49 /** |
| 50 * Exposes the functionality common between all InputElement types. | 50 * Exposes the functionality common between all InputElement types. |
| 51 */ | 51 */ |
| 52 abstract class InputElementBase implements Element { | 52 abstract class InputElementBase implements Element { |
| 53 @DomName('HTMLInputElement.autofocus') | 53 @DomName('HTMLInputElement.autofocus') |
| 54 bool autofocus; | 54 bool autofocus; |
| 55 | 55 |
| 56 @DomName('HTMLInputElement.disabled') | 56 @DomName('HTMLInputElement.disabled') |
| 57 bool disabled; | 57 bool disabled; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 83 @DomName('HTMLInputElement.checkValidity') | 83 @DomName('HTMLInputElement.checkValidity') |
| 84 bool checkValidity(); | 84 bool checkValidity(); |
| 85 | 85 |
| 86 @DomName('HTMLInputElement.setCustomValidity') | 86 @DomName('HTMLInputElement.setCustomValidity') |
| 87 void setCustomValidity(String error); | 87 void setCustomValidity(String error); |
| 88 } | 88 } |
| 89 | 89 |
| 90 /** | 90 /** |
| 91 * Hidden input which is not intended to be seen or edited by the user. | 91 * Hidden input which is not intended to be seen or edited by the user. |
| 92 */ | 92 */ |
| 93 abstract class HiddenInputElement implements Element { | 93 abstract class HiddenInputElement implements InputElementBase { |
| 94 factory HiddenInputElement() => new InputElement(type: 'hidden'); | 94 factory HiddenInputElement() => new InputElement(type: 'hidden'); |
| 95 } | 95 } |
| 96 | 96 |
| 97 | 97 |
| 98 /** | 98 /** |
| 99 * Base interface for all inputs which involve text editing. | 99 * Base interface for all inputs which involve text editing. |
| 100 */ | 100 */ |
| 101 abstract class TextInputElementBase implements InputElementBase { | 101 abstract class TextInputElementBase implements InputElementBase { |
| 102 @DomName('HTMLInputElement.autocomplete') | 102 @DomName('HTMLInputElement.autocomplete') |
| 103 String autocomplete; | 103 String autocomplete; |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 factory ResetButtonInputElement() => new InputElement(type: 'reset'); | 589 factory ResetButtonInputElement() => new InputElement(type: 'reset'); |
| 590 } | 590 } |
| 591 | 591 |
| 592 /** | 592 /** |
| 593 * A button, with no default behavior. | 593 * A button, with no default behavior. |
| 594 */ | 594 */ |
| 595 abstract class ButtonInputElement implements InputElementBase { | 595 abstract class ButtonInputElement implements InputElementBase { |
| 596 factory ButtonInputElement() => new InputElement(type: 'button'); | 596 factory ButtonInputElement() => new InputElement(type: 'button'); |
| 597 } | 597 } |
| 598 | 598 |
| OLD | NEW |