-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathHTMLInputElement.res
More file actions
86 lines (75 loc) · 2.94 KB
/
HTMLInputElement.res
File metadata and controls
86 lines (75 loc) · 2.94 KB
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
open DOMAPI
include HTMLElement.Impl({type t = htmlInputElement})
/**
Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value.
@param n Value to increment the value by.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/stepUp)
*/
@send
external stepUp: (htmlInputElement, ~n: int=?) => unit = "stepUp"
/**
Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
@param n Value to decrement the value by.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/stepDown)
*/
@send
external stepDown: (htmlInputElement, ~n: int=?) => unit = "stepDown"
/**
Returns whether a form will validate when it is submitted, without having to submit it.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/checkValidity)
*/
@send
external checkValidity: htmlInputElement => bool = "checkValidity"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/reportValidity)
*/
@send
external reportValidity: htmlInputElement => bool = "reportValidity"
/**
Sets a custom error message that is displayed when a form is submitted.
@param error Sets a custom error message that is displayed when a form is submitted.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/setCustomValidity)
*/
@send
external setCustomValidity: (htmlInputElement, string) => unit = "setCustomValidity"
/**
Makes the selection equal to the current object.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/select)
*/
@send
external select: htmlInputElement => unit = "select"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/setRangeText)
*/
@send
external setRangeText: (htmlInputElement, string) => unit = "setRangeText"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/setRangeText)
*/
@send
external setRangeText2: (
htmlInputElement,
~replacement: string,
~start: int,
~end: int,
~selectionMode: selectionMode=?,
) => unit = "setRangeText"
/**
Sets the start and end positions of a selection in a text field.
@param start The offset into the text field for the start of the selection.
@param end The offset into the text field for the end of the selection.
@param direction The direction in which the selection is performed.
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/setSelectionRange)
*/
@send
external setSelectionRange: (
htmlInputElement,
~start: int,
~end: int,
~direction: string=?,
) => unit = "setSelectionRange"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/HTMLInputElement/showPicker)
*/
@send
external showPicker: htmlInputElement => unit = "showPicker"