/
IHTMLInputElement.ts
121 lines (112 loc) · 2.43 KB
/
IHTMLInputElement.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import File from '../../file/File';
import IHTMLElement from '../html-element/IHTMLElement';
import IHTMLFormElement from '../html-form-element/IHTMLFormElement';
import HTMLInputElementSelectionModeEnum from './HTMLInputElementSelectionModeEnum';
import ValidityState from '../validity-state/ValidityState';
/**
* HTML Input Element.
*
* Reference:
* https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement.
*/
export default interface IHTMLInputElement extends IHTMLElement {
readonly form: IHTMLFormElement;
formAction: string;
formMethod: string;
formNoValidate: boolean;
defaultChecked: boolean;
files: File[];
defaultValue: string;
height: number;
width: number;
size: number;
minLength: number;
maxLength: number;
type: string;
name: string;
alt: string;
min: string;
max: string;
pattern: string;
placeholder: string;
step: string;
inputmode: string;
accept: string;
allowdirs: string;
autocomplete: string;
src: string;
readOnly: boolean;
disabled: boolean;
autofocus: boolean;
required: boolean;
indeterminate: boolean;
multiple: boolean;
checked: boolean;
value: string;
selectionStart: number;
selectionEnd: number;
selectionDirection: string;
validity: ValidityState;
willValidate: boolean;
valueAsDate: Date;
valueAsNumber: number;
validationMessage: string;
/**
* Sets validation message.
*
* @param message Message.
*/
setCustomValidity(message: string): void;
/**
* Reports validity by dispatching an "invalid" event.
*/
reportValidity(): void;
/**
* Set selection range.
*
* @param start Start.
* @param end End.
* @param [direction="none"] Direction.
*/
setSelectionRange(start: number, end: number, direction: string): void;
/**
* Set range text.
*
* @param replacement Replacement.
* @param [start] Start.
* @param [end] End.
* @param [direction] Direction.
*/
setRangeText(
replacement: string,
start: number,
end: number,
selectionMode: HTMLInputElementSelectionModeEnum
): void;
/**
* Checks validity.
*
* @returns "true" if the field is valid.
*/
checkValidity(): boolean;
/**
* Steps up.
*
* @param [increment] Increment.
*/
stepUp(increment?: number): void;
/**
* Steps up.
*
* @param [increment] Increment.
*/
stepDown(increment?: number): void;
/**
* Clones a node.
*
* @override
* @param [deep=false] "true" to clone deep.
* @returns Cloned node.
*/
cloneNode(deep: boolean): IHTMLInputElement;
}