Skip to main content

web_sys/features/
gen_HtmlTrackElement.rs

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 = "HTMLTrackElement",
14        typescript_type = "HTMLTrackElement"
15    )]
16    #[derive(Debug, Clone, PartialEq, Eq)]
17    #[doc = "The `HtmlTrackElement` class."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
22    pub type HtmlTrackElement;
23    #[wasm_bindgen(method, getter, js_class = "HTMLTrackElement", js_name = "kind")]
24    #[doc = "Getter for the `kind` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/kind)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
29    pub fn kind(this: &HtmlTrackElement) -> ::alloc::string::String;
30    #[wasm_bindgen(method, setter, js_class = "HTMLTrackElement", js_name = "kind")]
31    #[doc = "Setter for the `kind` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/kind)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
36    pub fn set_kind(this: &HtmlTrackElement, value: &str);
37    #[wasm_bindgen(method, getter, js_class = "HTMLTrackElement", 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/HTMLTrackElement/src)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
43    pub fn src(this: &HtmlTrackElement) -> ::alloc::string::String;
44    #[wasm_bindgen(method, setter, js_class = "HTMLTrackElement", 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/HTMLTrackElement/src)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
50    pub fn set_src(this: &HtmlTrackElement, value: &str);
51    #[wasm_bindgen(method, getter, js_class = "HTMLTrackElement", js_name = "srclang")]
52    #[doc = "Getter for the `srclang` field of this object."]
53    #[doc = ""]
54    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/srclang)"]
55    #[doc = ""]
56    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
57    pub fn srclang(this: &HtmlTrackElement) -> ::alloc::string::String;
58    #[wasm_bindgen(method, setter, js_class = "HTMLTrackElement", js_name = "srclang")]
59    #[doc = "Setter for the `srclang` field of this object."]
60    #[doc = ""]
61    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/srclang)"]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
64    pub fn set_srclang(this: &HtmlTrackElement, value: &str);
65    #[wasm_bindgen(method, getter, js_class = "HTMLTrackElement", js_name = "label")]
66    #[doc = "Getter for the `label` field of this object."]
67    #[doc = ""]
68    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/label)"]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
71    pub fn label(this: &HtmlTrackElement) -> ::alloc::string::String;
72    #[wasm_bindgen(method, setter, js_class = "HTMLTrackElement", js_name = "label")]
73    #[doc = "Setter for the `label` field of this object."]
74    #[doc = ""]
75    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/label)"]
76    #[doc = ""]
77    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
78    pub fn set_label(this: &HtmlTrackElement, value: &str);
79    #[wasm_bindgen(method, getter, js_class = "HTMLTrackElement", js_name = "default")]
80    #[doc = "Getter for the `default` field of this object."]
81    #[doc = ""]
82    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/default)"]
83    #[doc = ""]
84    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
85    pub fn default(this: &HtmlTrackElement) -> bool;
86    #[wasm_bindgen(method, setter, js_class = "HTMLTrackElement", js_name = "default")]
87    #[doc = "Setter for the `default` field of this object."]
88    #[doc = ""]
89    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/default)"]
90    #[doc = ""]
91    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
92    pub fn set_default(this: &HtmlTrackElement, value: bool);
93    #[wasm_bindgen(method, getter, js_class = "HTMLTrackElement", js_name = "readyState")]
94    #[doc = "Getter for the `readyState` field of this object."]
95    #[doc = ""]
96    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/readyState)"]
97    #[doc = ""]
98    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
99    pub fn ready_state(this: &HtmlTrackElement) -> u16;
100    #[cfg(feature = "TextTrack")]
101    #[wasm_bindgen(method, getter, js_class = "HTMLTrackElement", js_name = "track")]
102    #[doc = "Getter for the `track` field of this object."]
103    #[doc = ""]
104    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTrackElement/track)"]
105    #[doc = ""]
106    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`, `TextTrack`*"]
107    pub fn track(this: &HtmlTrackElement) -> Option<TextTrack>;
108}
109impl HtmlTrackElement {
110    #[doc = "The `HTMLTrackElement.NONE` const."]
111    #[doc = ""]
112    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
113    pub const NONE: u16 = 0i64 as u16;
114    #[doc = "The `HTMLTrackElement.LOADING` const."]
115    #[doc = ""]
116    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
117    pub const LOADING: u16 = 1u64 as u16;
118    #[doc = "The `HTMLTrackElement.LOADED` const."]
119    #[doc = ""]
120    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
121    pub const LOADED: u16 = 2u64 as u16;
122    #[doc = "The `HTMLTrackElement.ERROR` const."]
123    #[doc = ""]
124    #[doc = "*This API requires the following crate features to be activated: `HtmlTrackElement`*"]
125    pub const ERROR: u16 = 3u64 as u16;
126}