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`*"]