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