1 | #![allow (unused_imports)] |
2 | #![allow (clippy::all)] |
3 | use super::*; |
4 | use wasm_bindgen::prelude::*; |
5 | #[wasm_bindgen ] |
6 | extern "C" { |
7 | # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FormData , typescript_type = "FormData" )] |
8 | #[derive (Debug, Clone, PartialEq, Eq)] |
9 | #[doc = "The `FormData` class." ] |
10 | #[doc = "" ] |
11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData)" ] |
12 | #[doc = "" ] |
13 | #[doc = "*This API requires the following crate features to be activated: `FormData`*" ] |
14 | pub type FormData; |
15 | #[wasm_bindgen (catch, constructor, js_class = "FormData" )] |
16 | #[doc = "The `new FormData(..)` constructor, creating a new instance of `FormData`." ] |
17 | #[doc = "" ] |
18 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/FormData)" ] |
19 | #[doc = "" ] |
20 | #[doc = "*This API requires the following crate features to be activated: `FormData`*" ] |
21 | pub fn new() -> Result<FormData, JsValue>; |
22 | #[cfg (feature = "HtmlFormElement" )] |
23 | #[wasm_bindgen (catch, constructor, js_class = "FormData" )] |
24 | #[doc = "The `new FormData(..)` constructor, creating a new instance of `FormData`." ] |
25 | #[doc = "" ] |
26 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/FormData)" ] |
27 | #[doc = "" ] |
28 | #[doc = "*This API requires the following crate features to be activated: `FormData`, `HtmlFormElement`*" ] |
29 | pub fn new_with_form(form: &HtmlFormElement) -> Result<FormData, JsValue>; |
30 | #[cfg (feature = "Blob" )] |
31 | # [wasm_bindgen (catch , method , structural , js_class = "FormData" , js_name = append)] |
32 | #[doc = "The `append()` method." ] |
33 | #[doc = "" ] |
34 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/append)" ] |
35 | #[doc = "" ] |
36 | #[doc = "*This API requires the following crate features to be activated: `Blob`, `FormData`*" ] |
37 | pub fn append_with_blob(this: &FormData, name: &str, value: &Blob) -> Result<(), JsValue>; |
38 | #[cfg (feature = "Blob" )] |
39 | # [wasm_bindgen (catch , method , structural , js_class = "FormData" , js_name = append)] |
40 | #[doc = "The `append()` method." ] |
41 | #[doc = "" ] |
42 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/append)" ] |
43 | #[doc = "" ] |
44 | #[doc = "*This API requires the following crate features to be activated: `Blob`, `FormData`*" ] |
45 | pub fn append_with_blob_and_filename( |
46 | this: &FormData, |
47 | name: &str, |
48 | value: &Blob, |
49 | filename: &str, |
50 | ) -> Result<(), JsValue>; |
51 | # [wasm_bindgen (catch , method , structural , js_class = "FormData" , js_name = append)] |
52 | #[doc = "The `append()` method." ] |
53 | #[doc = "" ] |
54 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/append)" ] |
55 | #[doc = "" ] |
56 | #[doc = "*This API requires the following crate features to be activated: `FormData`*" ] |
57 | pub fn append_with_str(this: &FormData, name: &str, value: &str) -> Result<(), JsValue>; |
58 | # [wasm_bindgen (method , structural , js_class = "FormData" , js_name = delete)] |
59 | #[doc = "The `delete()` method." ] |
60 | #[doc = "" ] |
61 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/delete)" ] |
62 | #[doc = "" ] |
63 | #[doc = "*This API requires the following crate features to be activated: `FormData`*" ] |
64 | pub fn delete(this: &FormData, name: &str); |
65 | # [wasm_bindgen (method , structural , js_class = "FormData" , js_name = get)] |
66 | #[doc = "The `get()` method." ] |
67 | #[doc = "" ] |
68 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/get)" ] |
69 | #[doc = "" ] |
70 | #[doc = "*This API requires the following crate features to be activated: `FormData`*" ] |
71 | pub fn get(this: &FormData, name: &str) -> ::wasm_bindgen::JsValue; |
72 | # [wasm_bindgen (method , structural , js_class = "FormData" , js_name = getAll)] |
73 | #[doc = "The `getAll()` method." ] |
74 | #[doc = "" ] |
75 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/getAll)" ] |
76 | #[doc = "" ] |
77 | #[doc = "*This API requires the following crate features to be activated: `FormData`*" ] |
78 | pub fn get_all(this: &FormData, name: &str) -> ::js_sys::Array; |
79 | # [wasm_bindgen (method , structural , js_class = "FormData" , js_name = has)] |
80 | #[doc = "The `has()` method." ] |
81 | #[doc = "" ] |
82 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/has)" ] |
83 | #[doc = "" ] |
84 | #[doc = "*This API requires the following crate features to be activated: `FormData`*" ] |
85 | pub fn has(this: &FormData, name: &str) -> bool; |
86 | #[cfg (feature = "Blob" )] |
87 | # [wasm_bindgen (catch , method , structural , js_class = "FormData" , js_name = set)] |
88 | #[doc = "The `set()` method." ] |
89 | #[doc = "" ] |
90 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/set)" ] |
91 | #[doc = "" ] |
92 | #[doc = "*This API requires the following crate features to be activated: `Blob`, `FormData`*" ] |
93 | pub fn set_with_blob(this: &FormData, name: &str, value: &Blob) -> Result<(), JsValue>; |
94 | #[cfg (feature = "Blob" )] |
95 | # [wasm_bindgen (catch , method , structural , js_class = "FormData" , js_name = set)] |
96 | #[doc = "The `set()` method." ] |
97 | #[doc = "" ] |
98 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/set)" ] |
99 | #[doc = "" ] |
100 | #[doc = "*This API requires the following crate features to be activated: `Blob`, `FormData`*" ] |
101 | pub fn set_with_blob_and_filename( |
102 | this: &FormData, |
103 | name: &str, |
104 | value: &Blob, |
105 | filename: &str, |
106 | ) -> Result<(), JsValue>; |
107 | # [wasm_bindgen (catch , method , structural , js_class = "FormData" , js_name = set)] |
108 | #[doc = "The `set()` method." ] |
109 | #[doc = "" ] |
110 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FormData/set)" ] |
111 | #[doc = "" ] |
112 | #[doc = "*This API requires the following crate features to be activated: `FormData`*" ] |
113 | pub fn set_with_str(this: &FormData, name: &str, value: &str) -> Result<(), JsValue>; |
114 | } |
115 | |