-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathFormData.res
More file actions
64 lines (54 loc) · 1.64 KB
/
FormData.res
File metadata and controls
64 lines (54 loc) · 1.64 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
open FetchAPI
open FileAPI
open DOMAPI
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData)
*/
@new
external make: (~form: htmlFormElement=?, ~submitter: htmlElement=?) => formData = "FormData"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/append)
*/
@send
external append: (formData, ~name: string, ~value: string) => unit = "append"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/append)
*/
@send
external appendBlob: (formData, ~name: string, ~blobValue: blob, ~filename: string=?) => unit =
"append"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/delete)
*/
@send
external delete: (formData, string) => unit = "delete"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/get)
*/
@send
external get: (formData, string) => string = "get"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/get)
*/
@send
external getFile: (formData, string) => file = "get"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/getAll)
*/
@send
external getAll: (formData, string) => array<formDataEntryValue> = "getAll"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/has)
*/
@send
external has: (formData, string) => bool = "has"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/set)
*/
@send
external set: (formData, ~name: string, ~value: string) => unit = "set"
/**
[Read more on MDN](https://developer.mozilla.org/docs/Web/API/FormData/set)
*/
@send
external setBlob: (formData, ~name: string, ~blobValue: blob, ~filename: string=?) => unit = "set"