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