maxcountryman_web_sys/features/
gen_HtmlImageElement.rs

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