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