web_sys/features/
gen_MediaList.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = MediaList , typescript_type = "MediaList")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `MediaList` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaList)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `MediaList`*"]
14 pub type MediaList;
15 # [wasm_bindgen (structural , method , getter , js_class = "MediaList" , js_name = mediaText)]
16 #[doc = "Getter for the `mediaText` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaList/mediaText)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `MediaList`*"]
21 pub fn media_text(this: &MediaList) -> ::alloc::string::String;
22 # [wasm_bindgen (structural , method , setter , js_class = "MediaList" , js_name = mediaText)]
23 #[doc = "Setter for the `mediaText` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaList/mediaText)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `MediaList`*"]
28 pub fn set_media_text(this: &MediaList, value: &str);
29 # [wasm_bindgen (structural , method , getter , js_class = "MediaList" , js_name = length)]
30 #[doc = "Getter for the `length` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaList/length)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `MediaList`*"]
35 pub fn length(this: &MediaList) -> u32;
36 # [wasm_bindgen (catch , method , structural , js_class = "MediaList" , js_name = appendMedium)]
37 #[doc = "The `appendMedium()` method."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaList/appendMedium)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `MediaList`*"]
42 pub fn append_medium(this: &MediaList, new_medium: &str) -> Result<(), JsValue>;
43 # [wasm_bindgen (catch , method , structural , js_class = "MediaList" , js_name = deleteMedium)]
44 #[doc = "The `deleteMedium()` method."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaList/deleteMedium)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `MediaList`*"]
49 pub fn delete_medium(this: &MediaList, old_medium: &str) -> Result<(), JsValue>;
50 # [wasm_bindgen (method , structural , js_class = "MediaList" , js_name = item)]
51 #[doc = "The `item()` method."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaList/item)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `MediaList`*"]
56 pub fn item(this: &MediaList, index: u32) -> Option<::alloc::string::String>;
57 #[wasm_bindgen(method, structural, js_class = "MediaList", indexing_getter)]
58 #[doc = "Indexing getter. As in the literal Javascript `this[key]`."]
59 #[doc = ""]
60 #[doc = ""]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `MediaList`*"]
63 pub fn get(this: &MediaList, index: u32) -> Option<::alloc::string::String>;
64}