1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = Node , extends = EventTarget , extends = :: js_sys :: Object , js_name = Element , typescript_type = "Element")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `Element` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
14 pub type Element;
15 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = namespaceURI)]
16 #[doc = "Getter for the `namespaceURI` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/namespaceURI)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
21 pub fn namespace_uri(this: &Element) -> Option<::alloc::string::String>;
22 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = prefix)]
23 #[doc = "Getter for the `prefix` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/prefix)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
28 pub fn prefix(this: &Element) -> Option<::alloc::string::String>;
29 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = localName)]
30 #[doc = "Getter for the `localName` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/localName)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
35 pub fn local_name(this: &Element) -> ::alloc::string::String;
36 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = tagName)]
37 #[doc = "Getter for the `tagName` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
42 pub fn tag_name(this: &Element) -> ::alloc::string::String;
43 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = id)]
44 #[doc = "Getter for the `id` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/id)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
49 pub fn id(this: &Element) -> ::alloc::string::String;
50 # [wasm_bindgen (structural , method , setter , js_class = "Element" , js_name = id)]
51 #[doc = "Setter for the `id` field of this object."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/id)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
56 pub fn set_id(this: &Element, value: &str);
57 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = className)]
58 #[doc = "Getter for the `className` field of this object."]
59 #[doc = ""]
60 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)"]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
63 pub fn class_name(this: &Element) -> ::alloc::string::String;
64 # [wasm_bindgen (structural , method , setter , js_class = "Element" , js_name = className)]
65 #[doc = "Setter for the `className` field of this object."]
66 #[doc = ""]
67 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/className)"]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
70 pub fn set_class_name(this: &Element, value: &str);
71 #[cfg(feature = "DomTokenList")]
72 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = classList)]
73 #[doc = "Getter for the `classList` field of this object."]
74 #[doc = ""]
75 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList)"]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `DomTokenList`, `Element`*"]
78 pub fn class_list(this: &Element) -> DomTokenList;
79 #[cfg(feature = "NamedNodeMap")]
80 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = attributes)]
81 #[doc = "Getter for the `attributes` field of this object."]
82 #[doc = ""]
83 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/attributes)"]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `Element`, `NamedNodeMap`*"]
86 pub fn attributes(this: &Element) -> NamedNodeMap;
87 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = scrollTop)]
88 #[doc = "Getter for the `scrollTop` field of this object."]
89 #[doc = ""]
90 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTop)"]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
93 pub fn scroll_top(this: &Element) -> i32;
94 # [wasm_bindgen (structural , method , setter , js_class = "Element" , js_name = scrollTop)]
95 #[doc = "Setter for the `scrollTop` field of this object."]
96 #[doc = ""]
97 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTop)"]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
100 pub fn set_scroll_top(this: &Element, value: i32);
101 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = scrollLeft)]
102 #[doc = "Getter for the `scrollLeft` field of this object."]
103 #[doc = ""]
104 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft)"]
105 #[doc = ""]
106 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
107 pub fn scroll_left(this: &Element) -> i32;
108 # [wasm_bindgen (structural , method , setter , js_class = "Element" , js_name = scrollLeft)]
109 #[doc = "Setter for the `scrollLeft` field of this object."]
110 #[doc = ""]
111 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft)"]
112 #[doc = ""]
113 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
114 pub fn set_scroll_left(this: &Element, value: i32);
115 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = scrollWidth)]
116 #[doc = "Getter for the `scrollWidth` field of this object."]
117 #[doc = ""]
118 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollWidth)"]
119 #[doc = ""]
120 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
121 pub fn scroll_width(this: &Element) -> i32;
122 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = scrollHeight)]
123 #[doc = "Getter for the `scrollHeight` field of this object."]
124 #[doc = ""]
125 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight)"]
126 #[doc = ""]
127 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
128 pub fn scroll_height(this: &Element) -> i32;
129 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = clientTop)]
130 #[doc = "Getter for the `clientTop` field of this object."]
131 #[doc = ""]
132 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientTop)"]
133 #[doc = ""]
134 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
135 pub fn client_top(this: &Element) -> i32;
136 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = clientLeft)]
137 #[doc = "Getter for the `clientLeft` field of this object."]
138 #[doc = ""]
139 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientLeft)"]
140 #[doc = ""]
141 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
142 pub fn client_left(this: &Element) -> i32;
143 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = clientWidth)]
144 #[doc = "Getter for the `clientWidth` field of this object."]
145 #[doc = ""]
146 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth)"]
147 #[doc = ""]
148 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
149 pub fn client_width(this: &Element) -> i32;
150 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = clientHeight)]
151 #[doc = "Getter for the `clientHeight` field of this object."]
152 #[doc = ""]
153 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight)"]
154 #[doc = ""]
155 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
156 pub fn client_height(this: &Element) -> i32;
157 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = innerHTML)]
158 #[doc = "Getter for the `innerHTML` field of this object."]
159 #[doc = ""]
160 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML)"]
161 #[doc = ""]
162 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
163 pub fn inner_html(this: &Element) -> ::alloc::string::String;
164 # [wasm_bindgen (structural , method , setter , js_class = "Element" , js_name = innerHTML)]
165 #[doc = "Setter for the `innerHTML` field of this object."]
166 #[doc = ""]
167 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/innerHTML)"]
168 #[doc = ""]
169 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
170 pub fn set_inner_html(this: &Element, value: &str);
171 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = outerHTML)]
172 #[doc = "Getter for the `outerHTML` field of this object."]
173 #[doc = ""]
174 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/outerHTML)"]
175 #[doc = ""]
176 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
177 pub fn outer_html(this: &Element) -> ::alloc::string::String;
178 # [wasm_bindgen (structural , method , setter , js_class = "Element" , js_name = outerHTML)]
179 #[doc = "Setter for the `outerHTML` field of this object."]
180 #[doc = ""]
181 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/outerHTML)"]
182 #[doc = ""]
183 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
184 pub fn set_outer_html(this: &Element, value: &str);
185 #[cfg(feature = "ShadowRoot")]
186 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = shadowRoot)]
187 #[doc = "Getter for the `shadowRoot` field of this object."]
188 #[doc = ""]
189 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/shadowRoot)"]
190 #[doc = ""]
191 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`*"]
192 pub fn shadow_root(this: &Element) -> Option<ShadowRoot>;
193 #[cfg(feature = "HtmlSlotElement")]
194 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = assignedSlot)]
195 #[doc = "Getter for the `assignedSlot` field of this object."]
196 #[doc = ""]
197 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/assignedSlot)"]
198 #[doc = ""]
199 #[doc = "*This API requires the following crate features to be activated: `Element`, `HtmlSlotElement`*"]
200 pub fn assigned_slot(this: &Element) -> Option<HtmlSlotElement>;
201 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = slot)]
202 #[doc = "Getter for the `slot` field of this object."]
203 #[doc = ""]
204 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/slot)"]
205 #[doc = ""]
206 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
207 pub fn slot(this: &Element) -> ::alloc::string::String;
208 # [wasm_bindgen (structural , method , setter , js_class = "Element" , js_name = slot)]
209 #[doc = "Setter for the `slot` field of this object."]
210 #[doc = ""]
211 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/slot)"]
212 #[doc = ""]
213 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
214 pub fn set_slot(this: &Element, value: &str);
215 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = previousElementSibling)]
216 #[doc = "Getter for the `previousElementSibling` field of this object."]
217 #[doc = ""]
218 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/previousElementSibling)"]
219 #[doc = ""]
220 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
221 pub fn previous_element_sibling(this: &Element) -> Option<Element>;
222 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = nextElementSibling)]
223 #[doc = "Getter for the `nextElementSibling` field of this object."]
224 #[doc = ""]
225 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/nextElementSibling)"]
226 #[doc = ""]
227 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
228 pub fn next_element_sibling(this: &Element) -> Option<Element>;
229 #[cfg(feature = "HtmlCollection")]
230 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = children)]
231 #[doc = "Getter for the `children` field of this object."]
232 #[doc = ""]
233 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/children)"]
234 #[doc = ""]
235 #[doc = "*This API requires the following crate features to be activated: `Element`, `HtmlCollection`*"]
236 pub fn children(this: &Element) -> HtmlCollection;
237 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = firstElementChild)]
238 #[doc = "Getter for the `firstElementChild` field of this object."]
239 #[doc = ""]
240 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/firstElementChild)"]
241 #[doc = ""]
242 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
243 pub fn first_element_child(this: &Element) -> Option<Element>;
244 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = lastElementChild)]
245 #[doc = "Getter for the `lastElementChild` field of this object."]
246 #[doc = ""]
247 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/lastElementChild)"]
248 #[doc = ""]
249 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
250 pub fn last_element_child(this: &Element) -> Option<Element>;
251 # [wasm_bindgen (structural , method , getter , js_class = "Element" , js_name = childElementCount)]
252 #[doc = "Getter for the `childElementCount` field of this object."]
253 #[doc = ""]
254 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/childElementCount)"]
255 #[doc = ""]
256 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
257 pub fn child_element_count(this: &Element) -> u32;
258 #[cfg(all(feature = "ShadowRoot", feature = "ShadowRootInit",))]
259 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = attachShadow)]
260 #[doc = "The `attachShadow()` method."]
261 #[doc = ""]
262 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/attachShadow)"]
263 #[doc = ""]
264 #[doc = "*This API requires the following crate features to be activated: `Element`, `ShadowRoot`, `ShadowRootInit`*"]
265 pub fn attach_shadow(
266 this: &Element,
267 shadow_root_init_dict: &ShadowRootInit,
268 ) -> Result<ShadowRoot, JsValue>;
269 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = closest)]
270 #[doc = "The `closest()` method."]
271 #[doc = ""]
272 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/closest)"]
273 #[doc = ""]
274 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
275 pub fn closest(this: &Element, selector: &str) -> Result<Option<Element>, JsValue>;
276 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = getAttribute)]
277 #[doc = "The `getAttribute()` method."]
278 #[doc = ""]
279 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute)"]
280 #[doc = ""]
281 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
282 pub fn get_attribute(this: &Element, name: &str) -> Option<::alloc::string::String>;
283 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = getAttributeNS)]
284 #[doc = "The `getAttributeNS()` method."]
285 #[doc = ""]
286 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNS)"]
287 #[doc = ""]
288 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
289 pub fn get_attribute_ns(
290 this: &Element,
291 namespace: Option<&str>,
292 local_name: &str,
293 ) -> Option<::alloc::string::String>;
294 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = getAttributeNames)]
295 #[doc = "The `getAttributeNames()` method."]
296 #[doc = ""]
297 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNames)"]
298 #[doc = ""]
299 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
300 pub fn get_attribute_names(this: &Element) -> ::js_sys::Array;
301 #[cfg(feature = "Attr")]
302 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = getAttributeNode)]
303 #[doc = "The `getAttributeNode()` method."]
304 #[doc = ""]
305 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNode)"]
306 #[doc = ""]
307 #[doc = "*This API requires the following crate features to be activated: `Attr`, `Element`*"]
308 pub fn get_attribute_node(this: &Element, name: &str) -> Option<Attr>;
309 #[cfg(feature = "Attr")]
310 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = getAttributeNodeNS)]
311 #[doc = "The `getAttributeNodeNS()` method."]
312 #[doc = ""]
313 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNodeNS)"]
314 #[doc = ""]
315 #[doc = "*This API requires the following crate features to be activated: `Attr`, `Element`*"]
316 pub fn get_attribute_node_ns(
317 this: &Element,
318 namespace_uri: Option<&str>,
319 local_name: &str,
320 ) -> Option<Attr>;
321 #[cfg(feature = "DomRect")]
322 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = getBoundingClientRect)]
323 #[doc = "The `getBoundingClientRect()` method."]
324 #[doc = ""]
325 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect)"]
326 #[doc = ""]
327 #[doc = "*This API requires the following crate features to be activated: `DomRect`, `Element`*"]
328 pub fn get_bounding_client_rect(this: &Element) -> DomRect;
329 #[cfg(feature = "DomRectList")]
330 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = getClientRects)]
331 #[doc = "The `getClientRects()` method."]
332 #[doc = ""]
333 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/getClientRects)"]
334 #[doc = ""]
335 #[doc = "*This API requires the following crate features to be activated: `DomRectList`, `Element`*"]
336 pub fn get_client_rects(this: &Element) -> DomRectList;
337 #[cfg(feature = "HtmlCollection")]
338 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = getElementsByClassName)]
339 #[doc = "The `getElementsByClassName()` method."]
340 #[doc = ""]
341 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByClassName)"]
342 #[doc = ""]
343 #[doc = "*This API requires the following crate features to be activated: `Element`, `HtmlCollection`*"]
344 pub fn get_elements_by_class_name(this: &Element, class_names: &str) -> HtmlCollection;
345 #[cfg(feature = "HtmlCollection")]
346 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = getElementsByTagName)]
347 #[doc = "The `getElementsByTagName()` method."]
348 #[doc = ""]
349 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByTagName)"]
350 #[doc = ""]
351 #[doc = "*This API requires the following crate features to be activated: `Element`, `HtmlCollection`*"]
352 pub fn get_elements_by_tag_name(this: &Element, local_name: &str) -> HtmlCollection;
353 #[cfg(feature = "HtmlCollection")]
354 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = getElementsByTagNameNS)]
355 #[doc = "The `getElementsByTagNameNS()` method."]
356 #[doc = ""]
357 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/getElementsByTagNameNS)"]
358 #[doc = ""]
359 #[doc = "*This API requires the following crate features to be activated: `Element`, `HtmlCollection`*"]
360 pub fn get_elements_by_tag_name_ns(
361 this: &Element,
362 namespace: Option<&str>,
363 local_name: &str,
364 ) -> Result<HtmlCollection, JsValue>;
365 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = hasAttribute)]
366 #[doc = "The `hasAttribute()` method."]
367 #[doc = ""]
368 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttribute)"]
369 #[doc = ""]
370 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
371 pub fn has_attribute(this: &Element, name: &str) -> bool;
372 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = hasAttributeNS)]
373 #[doc = "The `hasAttributeNS()` method."]
374 #[doc = ""]
375 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttributeNS)"]
376 #[doc = ""]
377 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
378 pub fn has_attribute_ns(this: &Element, namespace: Option<&str>, local_name: &str) -> bool;
379 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = hasAttributes)]
380 #[doc = "The `hasAttributes()` method."]
381 #[doc = ""]
382 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/hasAttributes)"]
383 #[doc = ""]
384 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
385 pub fn has_attributes(this: &Element) -> bool;
386 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = hasPointerCapture)]
387 #[doc = "The `hasPointerCapture()` method."]
388 #[doc = ""]
389 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/hasPointerCapture)"]
390 #[doc = ""]
391 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
392 pub fn has_pointer_capture(this: &Element, pointer_id: i32) -> bool;
393 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = insertAdjacentElement)]
394 #[doc = "The `insertAdjacentElement()` method."]
395 #[doc = ""]
396 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentElement)"]
397 #[doc = ""]
398 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
399 pub fn insert_adjacent_element(
400 this: &Element,
401 where_: &str,
402 element: &Element,
403 ) -> Result<Option<Element>, JsValue>;
404 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = insertAdjacentHTML)]
405 #[doc = "The `insertAdjacentHTML()` method."]
406 #[doc = ""]
407 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML)"]
408 #[doc = ""]
409 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
410 pub fn insert_adjacent_html(this: &Element, position: &str, text: &str) -> Result<(), JsValue>;
411 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = insertAdjacentText)]
412 #[doc = "The `insertAdjacentText()` method."]
413 #[doc = ""]
414 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentText)"]
415 #[doc = ""]
416 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
417 pub fn insert_adjacent_text(this: &Element, where_: &str, data: &str) -> Result<(), JsValue>;
418 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = matches)]
419 #[doc = "The `matches()` method."]
420 #[doc = ""]
421 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/matches)"]
422 #[doc = ""]
423 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
424 pub fn matches(this: &Element, selector: &str) -> Result<bool, JsValue>;
425 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = querySelector)]
426 #[doc = "The `querySelector()` method."]
427 #[doc = ""]
428 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelector)"]
429 #[doc = ""]
430 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
431 pub fn query_selector(this: &Element, selectors: &str) -> Result<Option<Element>, JsValue>;
432 #[cfg(feature = "NodeList")]
433 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = querySelectorAll)]
434 #[doc = "The `querySelectorAll()` method."]
435 #[doc = ""]
436 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelectorAll)"]
437 #[doc = ""]
438 #[doc = "*This API requires the following crate features to be activated: `Element`, `NodeList`*"]
439 pub fn query_selector_all(this: &Element, selectors: &str) -> Result<NodeList, JsValue>;
440 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = releaseCapture)]
441 #[doc = "The `releaseCapture()` method."]
442 #[doc = ""]
443 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/releaseCapture)"]
444 #[doc = ""]
445 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
446 pub fn release_capture(this: &Element);
447 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = releasePointerCapture)]
448 #[doc = "The `releasePointerCapture()` method."]
449 #[doc = ""]
450 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/releasePointerCapture)"]
451 #[doc = ""]
452 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
453 pub fn release_pointer_capture(this: &Element, pointer_id: i32) -> Result<(), JsValue>;
454 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = removeAttribute)]
455 #[doc = "The `removeAttribute()` method."]
456 #[doc = ""]
457 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute)"]
458 #[doc = ""]
459 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
460 pub fn remove_attribute(this: &Element, name: &str) -> Result<(), JsValue>;
461 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = removeAttributeNS)]
462 #[doc = "The `removeAttributeNS()` method."]
463 #[doc = ""]
464 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttributeNS)"]
465 #[doc = ""]
466 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
467 pub fn remove_attribute_ns(
468 this: &Element,
469 namespace: Option<&str>,
470 local_name: &str,
471 ) -> Result<(), JsValue>;
472 #[cfg(feature = "Attr")]
473 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = removeAttributeNode)]
474 #[doc = "The `removeAttributeNode()` method."]
475 #[doc = ""]
476 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttributeNode)"]
477 #[doc = ""]
478 #[doc = "*This API requires the following crate features to be activated: `Attr`, `Element`*"]
479 pub fn remove_attribute_node(this: &Element, old_attr: &Attr) -> Result<Option<Attr>, JsValue>;
480 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = requestFullscreen)]
481 #[doc = "The `requestFullscreen()` method."]
482 #[doc = ""]
483 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullscreen)"]
484 #[doc = ""]
485 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
486 pub fn request_fullscreen(this: &Element) -> Result<(), JsValue>;
487 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = requestPointerLock)]
488 #[doc = "The `requestPointerLock()` method."]
489 #[doc = ""]
490 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestPointerLock)"]
491 #[doc = ""]
492 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
493 pub fn request_pointer_lock(this: &Element);
494 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scroll)]
495 #[doc = "The `scroll()` method."]
496 #[doc = ""]
497 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll)"]
498 #[doc = ""]
499 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
500 pub fn scroll_with_x_and_y(this: &Element, x: f64, y: f64);
501 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scroll)]
502 #[doc = "The `scroll()` method."]
503 #[doc = ""]
504 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll)"]
505 #[doc = ""]
506 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
507 pub fn scroll(this: &Element);
508 #[cfg(feature = "ScrollToOptions")]
509 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scroll)]
510 #[doc = "The `scroll()` method."]
511 #[doc = ""]
512 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll)"]
513 #[doc = ""]
514 #[doc = "*This API requires the following crate features to be activated: `Element`, `ScrollToOptions`*"]
515 pub fn scroll_with_scroll_to_options(this: &Element, options: &ScrollToOptions);
516 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scrollBy)]
517 #[doc = "The `scrollBy()` method."]
518 #[doc = ""]
519 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollBy)"]
520 #[doc = ""]
521 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
522 pub fn scroll_by_with_x_and_y(this: &Element, x: f64, y: f64);
523 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scrollBy)]
524 #[doc = "The `scrollBy()` method."]
525 #[doc = ""]
526 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollBy)"]
527 #[doc = ""]
528 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
529 pub fn scroll_by(this: &Element);
530 #[cfg(feature = "ScrollToOptions")]
531 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scrollBy)]
532 #[doc = "The `scrollBy()` method."]
533 #[doc = ""]
534 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollBy)"]
535 #[doc = ""]
536 #[doc = "*This API requires the following crate features to be activated: `Element`, `ScrollToOptions`*"]
537 pub fn scroll_by_with_scroll_to_options(this: &Element, options: &ScrollToOptions);
538 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scrollIntoView)]
539 #[doc = "The `scrollIntoView()` method."]
540 #[doc = ""]
541 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)"]
542 #[doc = ""]
543 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
544 pub fn scroll_into_view(this: &Element);
545 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scrollIntoView)]
546 #[doc = "The `scrollIntoView()` method."]
547 #[doc = ""]
548 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)"]
549 #[doc = ""]
550 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
551 pub fn scroll_into_view_with_bool(this: &Element, arg: bool);
552 #[cfg(feature = "ScrollIntoViewOptions")]
553 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scrollIntoView)]
554 #[doc = "The `scrollIntoView()` method."]
555 #[doc = ""]
556 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView)"]
557 #[doc = ""]
558 #[doc = "*This API requires the following crate features to be activated: `Element`, `ScrollIntoViewOptions`*"]
559 pub fn scroll_into_view_with_scroll_into_view_options(
560 this: &Element,
561 arg: &ScrollIntoViewOptions,
562 );
563 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scrollTo)]
564 #[doc = "The `scrollTo()` method."]
565 #[doc = ""]
566 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo)"]
567 #[doc = ""]
568 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
569 pub fn scroll_to_with_x_and_y(this: &Element, x: f64, y: f64);
570 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scrollTo)]
571 #[doc = "The `scrollTo()` method."]
572 #[doc = ""]
573 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo)"]
574 #[doc = ""]
575 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
576 pub fn scroll_to(this: &Element);
577 #[cfg(feature = "ScrollToOptions")]
578 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = scrollTo)]
579 #[doc = "The `scrollTo()` method."]
580 #[doc = ""]
581 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo)"]
582 #[doc = ""]
583 #[doc = "*This API requires the following crate features to be activated: `Element`, `ScrollToOptions`*"]
584 pub fn scroll_to_with_scroll_to_options(this: &Element, options: &ScrollToOptions);
585 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = setAttribute)]
586 #[doc = "The `setAttribute()` method."]
587 #[doc = ""]
588 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute)"]
589 #[doc = ""]
590 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
591 pub fn set_attribute(this: &Element, name: &str, value: &str) -> Result<(), JsValue>;
592 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = setAttributeNS)]
593 #[doc = "The `setAttributeNS()` method."]
594 #[doc = ""]
595 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttributeNS)"]
596 #[doc = ""]
597 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
598 pub fn set_attribute_ns(
599 this: &Element,
600 namespace: Option<&str>,
601 name: &str,
602 value: &str,
603 ) -> Result<(), JsValue>;
604 #[cfg(feature = "Attr")]
605 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = setAttributeNode)]
606 #[doc = "The `setAttributeNode()` method."]
607 #[doc = ""]
608 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttributeNode)"]
609 #[doc = ""]
610 #[doc = "*This API requires the following crate features to be activated: `Attr`, `Element`*"]
611 pub fn set_attribute_node(this: &Element, new_attr: &Attr) -> Result<Option<Attr>, JsValue>;
612 #[cfg(feature = "Attr")]
613 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = setAttributeNodeNS)]
614 #[doc = "The `setAttributeNodeNS()` method."]
615 #[doc = ""]
616 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttributeNodeNS)"]
617 #[doc = ""]
618 #[doc = "*This API requires the following crate features to be activated: `Attr`, `Element`*"]
619 pub fn set_attribute_node_ns(this: &Element, new_attr: &Attr) -> Result<Option<Attr>, JsValue>;
620 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = setCapture)]
621 #[doc = "The `setCapture()` method."]
622 #[doc = ""]
623 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/setCapture)"]
624 #[doc = ""]
625 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
626 pub fn set_capture(this: &Element);
627 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = setCapture)]
628 #[doc = "The `setCapture()` method."]
629 #[doc = ""]
630 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/setCapture)"]
631 #[doc = ""]
632 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
633 pub fn set_capture_with_retarget_to_element(this: &Element, retarget_to_element: bool);
634 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = setPointerCapture)]
635 #[doc = "The `setPointerCapture()` method."]
636 #[doc = ""]
637 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture)"]
638 #[doc = ""]
639 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
640 pub fn set_pointer_capture(this: &Element, pointer_id: i32) -> Result<(), JsValue>;
641 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = toggleAttribute)]
642 #[doc = "The `toggleAttribute()` method."]
643 #[doc = ""]
644 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/toggleAttribute)"]
645 #[doc = ""]
646 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
647 pub fn toggle_attribute(this: &Element, name: &str) -> Result<bool, JsValue>;
648 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = toggleAttribute)]
649 #[doc = "The `toggleAttribute()` method."]
650 #[doc = ""]
651 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/toggleAttribute)"]
652 #[doc = ""]
653 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
654 pub fn toggle_attribute_with_force(
655 this: &Element,
656 name: &str,
657 force: bool,
658 ) -> Result<bool, JsValue>;
659 # [wasm_bindgen (catch , method , structural , js_class = "Element" , js_name = webkitMatchesSelector)]
660 #[doc = "The `webkitMatchesSelector()` method."]
661 #[doc = ""]
662 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/webkitMatchesSelector)"]
663 #[doc = ""]
664 #[doc = "*This API requires the following crate features to be activated: `Element`*"]
665 pub fn webkit_matches_selector(this: &Element, selector: &str) -> Result<bool, JsValue>;
666 #[cfg(web_sys_unstable_apis)]
667 #[cfg(feature = "Animation")]
668 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = animate)]
669 #[doc = "The `animate()` method."]
670 #[doc = ""]
671 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/animate)"]
672 #[doc = ""]
673 #[doc = "*This API requires the following crate features to be activated: `Animation`, `Element`*"]
674 #[doc = ""]
675 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
676 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
677 pub fn animate(this: &Element, keyframes: Option<&::js_sys::Object>) -> Animation;
678 #[cfg(web_sys_unstable_apis)]
679 #[cfg(feature = "Animation")]
680 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = animate)]
681 #[doc = "The `animate()` method."]
682 #[doc = ""]
683 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/animate)"]
684 #[doc = ""]
685 #[doc = "*This API requires the following crate features to be activated: `Animation`, `Element`*"]
686 #[doc = ""]
687 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
688 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
689 pub fn animate_with_f64(
690 this: &Element,
691 keyframes: Option<&::js_sys::Object>,
692 options: f64,
693 ) -> Animation;
694 #[cfg(web_sys_unstable_apis)]
695 #[cfg(all(feature = "Animation", feature = "KeyframeAnimationOptions",))]
696 # [wasm_bindgen (method , structural , js_class = "Element" , js_name = animate)]
697 #[doc = "The `animate()` method."]
698 #[doc = ""]
699 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Element/animate)"]
700 #[doc = ""]
701 #[doc = "*This API requires the following crate features to be activated: `Animation`, `Element`, `KeyframeAnimationOptions`*"]
702 #[doc = ""]
703 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
704 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
705 pub fn animate_with_keyframe_animation_options(