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