Skip to main content

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