1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "HtmlElement",
9 extends = "Element",
10 extends = "Node",
11 extends = "EventTarget",
12 extends = "::js_sys::Object",
13 js_name = "HTMLButtonElement",
14 typescript_type = "HTMLButtonElement"
15 )]
16 #[derive(Debug, Clone, PartialEq, Eq)]
17 #[doc = "The `HtmlButtonElement` class."]
18 #[doc = ""]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement)"]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
22 pub type HtmlButtonElement;
23 #[wasm_bindgen(method, getter, js_class = "HTMLButtonElement", js_name = "autofocus")]
24 #[doc = "Getter for the `autofocus` field of this object."]
25 #[doc = ""]
26 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/autofocus)"]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
29 #[deprecated(
30 note = "Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."
31 )]
32 pub fn autofocus(this: &HtmlButtonElement) -> bool;
33 #[wasm_bindgen(method, setter, js_class = "HTMLButtonElement", js_name = "autofocus")]
34 #[doc = "Setter for the `autofocus` field of this object."]
35 #[doc = ""]
36 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/autofocus)"]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
39 #[deprecated(
40 note = "Use `HtmlElement::autofocus()` or `HtmlElement::set_autofocus()` instead."
41 )]
42 pub fn set_autofocus(this: &HtmlButtonElement, value: bool);
43 #[wasm_bindgen(method, getter, js_class = "HTMLButtonElement", js_name = "disabled")]
44 #[doc = "Getter for the `disabled` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/disabled)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
49 pub fn disabled(this: &HtmlButtonElement) -> bool;
50 #[wasm_bindgen(method, setter, js_class = "HTMLButtonElement", js_name = "disabled")]
51 #[doc = "Setter for the `disabled` field of this object."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/disabled)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
56 pub fn set_disabled(this: &HtmlButtonElement, value: bool);
57 #[cfg(feature = "HtmlFormElement")]
58 #[wasm_bindgen(method, getter, js_class = "HTMLButtonElement", js_name = "form")]
59 #[doc = "Getter for the `form` field of this object."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/form)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`, `HtmlFormElement`*"]
64 pub fn form(this: &HtmlButtonElement) -> Option<HtmlFormElement>;
65 #[wasm_bindgen(method, getter, js_class = "HTMLButtonElement", js_name = "formAction")]
66 #[doc = "Getter for the `formAction` field of this object."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/formAction)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
71 pub fn form_action(this: &HtmlButtonElement) -> ::alloc::string::String;
72 #[wasm_bindgen(method, setter, js_class = "HTMLButtonElement", js_name = "formAction")]
73 #[doc = "Setter for the `formAction` field of this object."]
74 #[doc = ""]
75 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/formAction)"]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
78 pub fn set_form_action(this: &HtmlButtonElement, value: &str);
79 #[wasm_bindgen(
80 method,
81 getter,
82 js_class = "HTMLButtonElement",
83 js_name = "formEnctype"
84 )]
85 #[doc = "Getter for the `formEnctype` field of this object."]
86 #[doc = ""]
87 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/formEnctype)"]
88 #[doc = ""]
89 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
90 pub fn form_enctype(this: &HtmlButtonElement) -> ::alloc::string::String;
91 #[wasm_bindgen(
92 method,
93 setter,
94 js_class = "HTMLButtonElement",
95 js_name = "formEnctype"
96 )]
97 #[doc = "Setter for the `formEnctype` field of this object."]
98 #[doc = ""]
99 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/formEnctype)"]
100 #[doc = ""]
101 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
102 pub fn set_form_enctype(this: &HtmlButtonElement, value: &str);
103 #[wasm_bindgen(method, getter, js_class = "HTMLButtonElement", js_name = "formMethod")]
104 #[doc = "Getter for the `formMethod` field of this object."]
105 #[doc = ""]
106 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/formMethod)"]
107 #[doc = ""]
108 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
109 pub fn form_method(this: &HtmlButtonElement) -> ::alloc::string::String;
110 #[wasm_bindgen(method, setter, js_class = "HTMLButtonElement", js_name = "formMethod")]
111 #[doc = "Setter for the `formMethod` field of this object."]
112 #[doc = ""]
113 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/formMethod)"]
114 #[doc = ""]
115 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
116 pub fn set_form_method(this: &HtmlButtonElement, value: &str);
117 #[wasm_bindgen(
118 method,
119 getter,
120 js_class = "HTMLButtonElement",
121 js_name = "formNoValidate"
122 )]
123 #[doc = "Getter for the `formNoValidate` field of this object."]
124 #[doc = ""]
125 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/formNoValidate)"]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
128 pub fn form_no_validate(this: &HtmlButtonElement) -> bool;
129 #[wasm_bindgen(
130 method,
131 setter,
132 js_class = "HTMLButtonElement",
133 js_name = "formNoValidate"
134 )]
135 #[doc = "Setter for the `formNoValidate` field of this object."]
136 #[doc = ""]
137 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/formNoValidate)"]
138 #[doc = ""]
139 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
140 pub fn set_form_no_validate(this: &HtmlButtonElement, value: bool);
141 #[wasm_bindgen(method, getter, js_class = "HTMLButtonElement", js_name = "formTarget")]
142 #[doc = "Getter for the `formTarget` field of this object."]
143 #[doc = ""]
144 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/formTarget)"]
145 #[doc = ""]
146 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
147 pub fn form_target(this: &HtmlButtonElement) -> ::alloc::string::String;
148 #[wasm_bindgen(method, setter, js_class = "HTMLButtonElement", js_name = "formTarget")]
149 #[doc = "Setter for the `formTarget` field of this object."]
150 #[doc = ""]
151 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/formTarget)"]
152 #[doc = ""]
153 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
154 pub fn set_form_target(this: &HtmlButtonElement, value: &str);
155 #[wasm_bindgen(method, getter, js_class = "HTMLButtonElement", js_name = "name")]
156 #[doc = "Getter for the `name` field of this object."]
157 #[doc = ""]
158 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/name)"]
159 #[doc = ""]
160 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
161 pub fn name(this: &HtmlButtonElement) -> ::alloc::string::String;
162 #[wasm_bindgen(method, setter, js_class = "HTMLButtonElement", js_name = "name")]
163 #[doc = "Setter for the `name` field of this object."]
164 #[doc = ""]
165 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/name)"]
166 #[doc = ""]
167 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
168 pub fn set_name(this: &HtmlButtonElement, value: &str);
169 #[wasm_bindgen(method, getter, js_class = "HTMLButtonElement", js_name = "type")]
170 #[doc = "Getter for the `type` field of this object."]
171 #[doc = ""]
172 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/type)"]
173 #[doc = ""]
174 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
175 pub fn type_(this: &HtmlButtonElement) -> ::alloc::string::String;
176 #[wasm_bindgen(method, setter, js_class = "HTMLButtonElement", js_name = "type")]
177 #[doc = "Setter for the `type` field of this object."]
178 #[doc = ""]
179 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/type)"]
180 #[doc = ""]
181 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
182 pub fn set_type(this: &HtmlButtonElement, value: &str);
183 #[wasm_bindgen(method, getter, js_class = "HTMLButtonElement", js_name = "value")]
184 #[doc = "Getter for the `value` field of this object."]
185 #[doc = ""]
186 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/value)"]
187 #[doc = ""]
188 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
189 pub fn value(this: &HtmlButtonElement) -> ::alloc::string::String;
190 #[wasm_bindgen(method, setter, js_class = "HTMLButtonElement", js_name = "value")]
191 #[doc = "Setter for the `value` field of this object."]
192 #[doc = ""]
193 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/value)"]
194 #[doc = ""]
195 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
196 pub fn set_value(this: &HtmlButtonElement, value: &str);
197 #[wasm_bindgen(
198 method,
199 getter,
200 js_class = "HTMLButtonElement",
201 js_name = "willValidate"
202 )]
203 #[doc = "Getter for the `willValidate` field of this object."]
204 #[doc = ""]
205 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/willValidate)"]
206 #[doc = ""]
207 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
208 pub fn will_validate(this: &HtmlButtonElement) -> bool;
209 #[cfg(feature = "ValidityState")]
210 #[wasm_bindgen(method, getter, js_class = "HTMLButtonElement", js_name = "validity")]
211 #[doc = "Getter for the `validity` field of this object."]
212 #[doc = ""]
213 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/validity)"]
214 #[doc = ""]
215 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`, `ValidityState`*"]
216 pub fn validity(this: &HtmlButtonElement) -> ValidityState;
217 #[wasm_bindgen(
218 catch,
219 method,
220 getter,
221 js_class = "HTMLButtonElement",
222 js_name = "validationMessage"
223 )]
224 #[doc = "Getter for the `validationMessage` field of this object."]
225 #[doc = ""]
226 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/validationMessage)"]
227 #[doc = ""]
228 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
229 pub fn validation_message(this: &HtmlButtonElement)
230 -> Result<::alloc::string::String, JsValue>;
231 #[cfg(feature = "NodeList")]
232 #[wasm_bindgen(method, getter, js_class = "HTMLButtonElement", js_name = "labels")]
233 #[doc = "Getter for the `labels` field of this object."]
234 #[doc = ""]
235 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/labels)"]
236 #[doc = ""]
237 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`, `NodeList`*"]
238 pub fn labels(this: &HtmlButtonElement) -> NodeList;
239 #[wasm_bindgen(
240 method,
241 getter,
242 js_class = "HTMLButtonElement",
243 js_name = "popoverTargetElement"
244 )]
245 #[doc = "Getter for the `popoverTargetElement` field of this object."]
246 #[doc = ""]
247 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/popoverTargetElement)"]
248 #[doc = ""]
249 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
250 pub fn popover_target_element(this: &HtmlButtonElement) -> Option<Element>;
251 #[wasm_bindgen(
252 method,
253 setter,
254 js_class = "HTMLButtonElement",
255 js_name = "popoverTargetElement"
256 )]
257 #[doc = "Setter for the `popoverTargetElement` field of this object."]
258 #[doc = ""]
259 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/popoverTargetElement)"]
260 #[doc = ""]
261 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
262 pub fn set_popover_target_element(this: &HtmlButtonElement, value: Option<&Element>);
263 #[wasm_bindgen(
264 method,
265 getter,
266 js_class = "HTMLButtonElement",
267 js_name = "popoverTargetAction"
268 )]
269 #[doc = "Getter for the `popoverTargetAction` field of this object."]
270 #[doc = ""]
271 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/popoverTargetAction)"]
272 #[doc = ""]
273 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
274 pub fn popover_target_action(this: &HtmlButtonElement) -> ::alloc::string::String;
275 #[wasm_bindgen(
276 method,
277 setter,
278 js_class = "HTMLButtonElement",
279 js_name = "popoverTargetAction"
280 )]
281 #[doc = "Setter for the `popoverTargetAction` field of this object."]
282 #[doc = ""]
283 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/popoverTargetAction)"]
284 #[doc = ""]
285 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
286 pub fn set_popover_target_action(this: &HtmlButtonElement, value: &str);
287 #[wasm_bindgen(method, js_class = "HTMLButtonElement", js_name = "checkValidity")]
288 #[doc = "The `checkValidity()` method."]
289 #[doc = ""]
290 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/checkValidity)"]
291 #[doc = ""]
292 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
293 pub fn check_validity(this: &HtmlButtonElement) -> bool;
294 #[wasm_bindgen(method, js_class = "HTMLButtonElement", js_name = "reportValidity")]
295 #[doc = "The `reportValidity()` method."]
296 #[doc = ""]
297 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/reportValidity)"]
298 #[doc = ""]
299 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
300 pub fn report_validity(this: &HtmlButtonElement) -> bool;
301 #[wasm_bindgen(method, js_class = "HTMLButtonElement", js_name = "setCustomValidity")]
302 #[doc = "The `setCustomValidity()` method."]
303 #[doc = ""]
304 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLButtonElement/setCustomValidity)"]
305 #[doc = ""]
306 #[doc = "*This API requires the following crate features to be activated: `HtmlButtonElement`*"]
307 pub fn set_custom_validity(this: &HtmlButtonElement, error: &str);
308}