web_sys/features/
gen_HtmlImageElement.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = HtmlElement , extends = Element , extends = Node , extends = EventTarget , extends = :: js_sys :: Object , js_name = HTMLImageElement , typescript_type = "HTMLImageElement")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `HtmlImageElement` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
14    pub type HtmlImageElement;
15    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = alt)]
16    #[doc = "Getter for the `alt` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
21    pub fn alt(this: &HtmlImageElement) -> ::alloc::string::String;
22    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = alt)]
23    #[doc = "Setter for the `alt` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/alt)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
28    pub fn set_alt(this: &HtmlImageElement, value: &str);
29    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = src)]
30    #[doc = "Getter for the `src` field of this object."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/src)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
35    pub fn src(this: &HtmlImageElement) -> ::alloc::string::String;
36    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = src)]
37    #[doc = "Setter for the `src` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/src)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
42    pub fn set_src(this: &HtmlImageElement, value: &str);
43    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = srcset)]
44    #[doc = "Getter for the `srcset` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
49    pub fn srcset(this: &HtmlImageElement) -> ::alloc::string::String;
50    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = srcset)]
51    #[doc = "Setter for the `srcset` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
56    pub fn set_srcset(this: &HtmlImageElement, value: &str);
57    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = crossOrigin)]
58    #[doc = "Getter for the `crossOrigin` field of this object."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
63    pub fn cross_origin(this: &HtmlImageElement) -> Option<::alloc::string::String>;
64    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = crossOrigin)]
65    #[doc = "Setter for the `crossOrigin` field of this object."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/crossOrigin)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
70    pub fn set_cross_origin(this: &HtmlImageElement, value: Option<&str>);
71    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = useMap)]
72    #[doc = "Getter for the `useMap` field of this object."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/useMap)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
77    pub fn use_map(this: &HtmlImageElement) -> ::alloc::string::String;
78    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = useMap)]
79    #[doc = "Setter for the `useMap` field of this object."]
80    #[doc = ""]
81    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/useMap)"]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
84    pub fn set_use_map(this: &HtmlImageElement, value: &str);
85    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = referrerPolicy)]
86    #[doc = "Getter for the `referrerPolicy` field of this object."]
87    #[doc = ""]
88    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy)"]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
91    pub fn referrer_policy(this: &HtmlImageElement) -> ::alloc::string::String;
92    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = referrerPolicy)]
93    #[doc = "Setter for the `referrerPolicy` field of this object."]
94    #[doc = ""]
95    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy)"]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
98    pub fn set_referrer_policy(this: &HtmlImageElement, value: &str);
99    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = isMap)]
100    #[doc = "Getter for the `isMap` field of this object."]
101    #[doc = ""]
102    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/isMap)"]
103    #[doc = ""]
104    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
105    pub fn is_map(this: &HtmlImageElement) -> bool;
106    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = isMap)]
107    #[doc = "Setter for the `isMap` field of this object."]
108    #[doc = ""]
109    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/isMap)"]
110    #[doc = ""]
111    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
112    pub fn set_is_map(this: &HtmlImageElement, value: bool);
113    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = width)]
114    #[doc = "Getter for the `width` field of this object."]
115    #[doc = ""]
116    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/width)"]
117    #[doc = ""]
118    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
119    pub fn width(this: &HtmlImageElement) -> u32;
120    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = width)]
121    #[doc = "Setter for the `width` field of this object."]
122    #[doc = ""]
123    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/width)"]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
126    pub fn set_width(this: &HtmlImageElement, value: u32);
127    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = height)]
128    #[doc = "Getter for the `height` field of this object."]
129    #[doc = ""]
130    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/height)"]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
133    pub fn height(this: &HtmlImageElement) -> u32;
134    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = height)]
135    #[doc = "Setter for the `height` field of this object."]
136    #[doc = ""]
137    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/height)"]
138    #[doc = ""]
139    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
140    pub fn set_height(this: &HtmlImageElement, value: u32);
141    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = decoding)]
142    #[doc = "Getter for the `decoding` field of this object."]
143    #[doc = ""]
144    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decoding)"]
145    #[doc = ""]
146    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
147    pub fn decoding(this: &HtmlImageElement) -> ::alloc::string::String;
148    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = decoding)]
149    #[doc = "Setter for the `decoding` field of this object."]
150    #[doc = ""]
151    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decoding)"]
152    #[doc = ""]
153    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
154    pub fn set_decoding(this: &HtmlImageElement, value: &str);
155    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = naturalWidth)]
156    #[doc = "Getter for the `naturalWidth` field of this object."]
157    #[doc = ""]
158    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/naturalWidth)"]
159    #[doc = ""]
160    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
161    pub fn natural_width(this: &HtmlImageElement) -> u32;
162    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = naturalHeight)]
163    #[doc = "Getter for the `naturalHeight` field of this object."]
164    #[doc = ""]
165    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/naturalHeight)"]
166    #[doc = ""]
167    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
168    pub fn natural_height(this: &HtmlImageElement) -> u32;
169    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = complete)]
170    #[doc = "Getter for the `complete` field of this object."]
171    #[doc = ""]
172    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/complete)"]
173    #[doc = ""]
174    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
175    pub fn complete(this: &HtmlImageElement) -> bool;
176    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = name)]
177    #[doc = "Getter for the `name` field of this object."]
178    #[doc = ""]
179    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/name)"]
180    #[doc = ""]
181    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
182    pub fn name(this: &HtmlImageElement) -> ::alloc::string::String;
183    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = name)]
184    #[doc = "Setter for the `name` field of this object."]
185    #[doc = ""]
186    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/name)"]
187    #[doc = ""]
188    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
189    pub fn set_name(this: &HtmlImageElement, value: &str);
190    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = align)]
191    #[doc = "Getter for the `align` field of this object."]
192    #[doc = ""]
193    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/align)"]
194    #[doc = ""]
195    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
196    pub fn align(this: &HtmlImageElement) -> ::alloc::string::String;
197    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = align)]
198    #[doc = "Setter for the `align` field of this object."]
199    #[doc = ""]
200    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/align)"]
201    #[doc = ""]
202    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
203    pub fn set_align(this: &HtmlImageElement, value: &str);
204    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = hspace)]
205    #[doc = "Getter for the `hspace` field of this object."]
206    #[doc = ""]
207    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/hspace)"]
208    #[doc = ""]
209    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
210    pub fn hspace(this: &HtmlImageElement) -> u32;
211    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = hspace)]
212    #[doc = "Setter for the `hspace` field of this object."]
213    #[doc = ""]
214    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/hspace)"]
215    #[doc = ""]
216    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
217    pub fn set_hspace(this: &HtmlImageElement, value: u32);
218    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = vspace)]
219    #[doc = "Getter for the `vspace` field of this object."]
220    #[doc = ""]
221    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/vspace)"]
222    #[doc = ""]
223    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
224    pub fn vspace(this: &HtmlImageElement) -> u32;
225    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = vspace)]
226    #[doc = "Setter for the `vspace` field of this object."]
227    #[doc = ""]
228    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/vspace)"]
229    #[doc = ""]
230    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
231    pub fn set_vspace(this: &HtmlImageElement, value: u32);
232    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = longDesc)]
233    #[doc = "Getter for the `longDesc` field of this object."]
234    #[doc = ""]
235    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/longDesc)"]
236    #[doc = ""]
237    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
238    pub fn long_desc(this: &HtmlImageElement) -> ::alloc::string::String;
239    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = longDesc)]
240    #[doc = "Setter for the `longDesc` field of this object."]
241    #[doc = ""]
242    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/longDesc)"]
243    #[doc = ""]
244    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
245    pub fn set_long_desc(this: &HtmlImageElement, value: &str);
246    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = border)]
247    #[doc = "Getter for the `border` field of this object."]
248    #[doc = ""]
249    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/border)"]
250    #[doc = ""]
251    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
252    pub fn border(this: &HtmlImageElement) -> ::alloc::string::String;
253    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = border)]
254    #[doc = "Setter for the `border` field of this object."]
255    #[doc = ""]
256    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/border)"]
257    #[doc = ""]
258    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
259    pub fn set_border(this: &HtmlImageElement, value: &str);
260    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = sizes)]
261    #[doc = "Getter for the `sizes` field of this object."]
262    #[doc = ""]
263    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/sizes)"]
264    #[doc = ""]
265    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
266    pub fn sizes(this: &HtmlImageElement) -> ::alloc::string::String;
267    # [wasm_bindgen (structural , method , setter , js_class = "HTMLImageElement" , js_name = sizes)]
268    #[doc = "Setter for the `sizes` field of this object."]
269    #[doc = ""]
270    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/sizes)"]
271    #[doc = ""]
272    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
273    pub fn set_sizes(this: &HtmlImageElement, value: &str);
274    # [wasm_bindgen (structural , method , getter , js_class = "HTMLImageElement" , js_name = currentSrc)]
275    #[doc = "Getter for the `currentSrc` field of this object."]
276    #[doc = ""]
277    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/currentSrc)"]
278    #[doc = ""]
279    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
280    pub fn current_src(this: &HtmlImageElement) -> ::alloc::string::String;
281    #[wasm_bindgen(catch, constructor, js_class = "Image")]
282    #[doc = "The `new HtmlImageElement(..)` constructor, creating a new instance of `HtmlImageElement`."]
283    #[doc = ""]
284    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/HTMLImageElement)"]
285    #[doc = ""]
286    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
287    pub fn new() -> Result<HtmlImageElement, JsValue>;
288    #[wasm_bindgen(catch, constructor, js_class = "Image")]
289    #[doc = "The `new HtmlImageElement(..)` constructor, creating a new instance of `HtmlImageElement`."]
290    #[doc = ""]
291    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/HTMLImageElement)"]
292    #[doc = ""]
293    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
294    pub fn new_with_width(width: u32) -> Result<HtmlImageElement, JsValue>;
295    #[wasm_bindgen(catch, constructor, js_class = "Image")]
296    #[doc = "The `new HtmlImageElement(..)` constructor, creating a new instance of `HtmlImageElement`."]
297    #[doc = ""]
298    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/HTMLImageElement)"]
299    #[doc = ""]
300    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
301    pub fn new_with_width_and_height(width: u32, height: u32) -> Result<HtmlImageElement, JsValue>;
302    # [wasm_bindgen (method , structural , js_class = "HTMLImageElement" , js_name = decode)]
303    #[doc = "The `decode()` method."]
304    #[doc = ""]
305    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decode)"]
306    #[doc = ""]
307    #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`*"]
308    pub fn decode(this: &HtmlImageElement) -> ::js_sys::Promise;
309}