Skip to main content

web_sys/features/
gen_OfflineAudioCompletionEventInit.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 = "OfflineAudioCompletionEventInit"
10    )]
11    #[derive(Debug, Clone, PartialEq, Eq)]
12    #[doc = "The `OfflineAudioCompletionEventInit` dictionary."]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"]
15    pub type OfflineAudioCompletionEventInit;
16    #[doc = "Get the `bubbles` field of this object."]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"]
19    #[wasm_bindgen(method, getter = "bubbles")]
20    pub fn get_bubbles(this: &OfflineAudioCompletionEventInit) -> Option<bool>;
21    #[doc = "Change the `bubbles` field of this object."]
22    #[doc = ""]
23    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"]
24    #[wasm_bindgen(method, setter = "bubbles")]
25    pub fn set_bubbles(this: &OfflineAudioCompletionEventInit, val: bool);
26    #[doc = "Get the `cancelable` field of this object."]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"]
29    #[wasm_bindgen(method, getter = "cancelable")]
30    pub fn get_cancelable(this: &OfflineAudioCompletionEventInit) -> Option<bool>;
31    #[doc = "Change the `cancelable` field of this object."]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"]
34    #[wasm_bindgen(method, setter = "cancelable")]
35    pub fn set_cancelable(this: &OfflineAudioCompletionEventInit, val: bool);
36    #[doc = "Get the `composed` field of this object."]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"]
39    #[wasm_bindgen(method, getter = "composed")]
40    pub fn get_composed(this: &OfflineAudioCompletionEventInit) -> Option<bool>;
41    #[doc = "Change the `composed` field of this object."]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `OfflineAudioCompletionEventInit`*"]
44    #[wasm_bindgen(method, setter = "composed")]
45    pub fn set_composed(this: &OfflineAudioCompletionEventInit, val: bool);
46    #[cfg(feature = "AudioBuffer")]
47    #[doc = "Get the `renderedBuffer` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `OfflineAudioCompletionEventInit`*"]
50    #[wasm_bindgen(method, getter = "renderedBuffer")]
51    pub fn get_rendered_buffer(this: &OfflineAudioCompletionEventInit) -> AudioBuffer;
52    #[cfg(feature = "AudioBuffer")]
53    #[doc = "Change the `renderedBuffer` field of this object."]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `OfflineAudioCompletionEventInit`*"]
56    #[wasm_bindgen(method, setter = "renderedBuffer")]
57    pub fn set_rendered_buffer(this: &OfflineAudioCompletionEventInit, val: &AudioBuffer);
58}
59impl OfflineAudioCompletionEventInit {
60    #[cfg(feature = "AudioBuffer")]
61    #[doc = "Construct a new `OfflineAudioCompletionEventInit`."]
62    #[doc = ""]
63    #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`, `OfflineAudioCompletionEventInit`*"]
64    pub fn new(rendered_buffer: &AudioBuffer) -> Self {
65        #[allow(unused_mut)]
66        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
67        ret.set_rendered_buffer(rendered_buffer);
68        ret
69    }
70    #[deprecated = "Use `set_bubbles()` instead."]
71    pub fn bubbles(&mut self, val: bool) -> &mut Self {
72        self.set_bubbles(val);
73        self
74    }
75    #[deprecated = "Use `set_cancelable()` instead."]
76    pub fn cancelable(&mut self, val: bool) -> &mut Self {
77        self.set_cancelable(val);
78        self
79    }
80    #[deprecated = "Use `set_composed()` instead."]
81    pub fn composed(&mut self, val: bool) -> &mut Self {
82        self.set_composed(val);
83        self
84    }
85    #[cfg(feature = "AudioBuffer")]
86    #[deprecated = "Use `set_rendered_buffer()` instead."]
87    pub fn rendered_buffer(&mut self, val: &AudioBuffer) -> &mut Self {
88        self.set_rendered_buffer(val);
89        self
90    }
91}