web_sys/features/
gen_Element.rs

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."]