Skip to main content

web_sys/features/
gen_HtmlAudioElement.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 = "HtmlMediaElement",
9        extends = "HtmlElement",
10        extends = "Element",
11        extends = "Node",
12        extends = "EventTarget",
13        extends = "::js_sys::Object",
14        js_name = "HTMLAudioElement",
15        typescript_type = "HTMLAudioElement"
16    )]
17    #[derive(Debug, Clone, PartialEq, Eq)]
18    #[doc = "The `HtmlAudioElement` class."]
19    #[doc = ""]
20    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement)"]
21    #[doc = ""]
22    #[doc = "*This API requires the following crate features to be activated: `HtmlAudioElement`*"]
23    pub type HtmlAudioElement;
24    #[wasm_bindgen(catch, constructor, js_class = "Audio")]
25    #[doc = "The `new HtmlAudioElement(..)` constructor, creating a new instance of `HtmlAudioElement`."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement/HTMLAudioElement)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `HtmlAudioElement`*"]
30    pub fn new() -> Result<HtmlAudioElement, JsValue>;
31    #[wasm_bindgen(catch, constructor, js_class = "Audio")]
32    #[doc = "The `new HtmlAudioElement(..)` constructor, creating a new instance of `HtmlAudioElement`."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLAudioElement/HTMLAudioElement)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `HtmlAudioElement`*"]
37    pub fn new_with_src(src: &str) -> Result<HtmlAudioElement, JsValue>;
38}