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