web_sys/features/
gen_AudioWorkletNode.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = AudioNode , extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioWorkletNode , typescript_type = "AudioWorkletNode")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `AudioWorkletNode` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`*"]
14    pub type AudioWorkletNode;
15    #[cfg(feature = "AudioParamMap")]
16    # [wasm_bindgen (structural , catch , method , getter , js_class = "AudioWorkletNode" , js_name = parameters)]
17    #[doc = "Getter for the `parameters` field of this object."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/parameters)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `AudioParamMap`, `AudioWorkletNode`*"]
22    pub fn parameters(this: &AudioWorkletNode) -> Result<AudioParamMap, JsValue>;
23    #[cfg(feature = "MessagePort")]
24    # [wasm_bindgen (structural , catch , method , getter , js_class = "AudioWorkletNode" , js_name = port)]
25    #[doc = "Getter for the `port` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/port)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`, `MessagePort`*"]
30    pub fn port(this: &AudioWorkletNode) -> Result<MessagePort, JsValue>;
31    # [wasm_bindgen (structural , method , getter , js_class = "AudioWorkletNode" , js_name = onprocessorerror)]
32    #[doc = "Getter for the `onprocessorerror` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/onprocessorerror)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`*"]
37    pub fn onprocessorerror(this: &AudioWorkletNode) -> Option<::js_sys::Function>;
38    # [wasm_bindgen (structural , method , setter , js_class = "AudioWorkletNode" , js_name = onprocessorerror)]
39    #[doc = "Setter for the `onprocessorerror` field of this object."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/onprocessorerror)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`*"]
44    pub fn set_onprocessorerror(this: &AudioWorkletNode, value: Option<&::js_sys::Function>);
45    #[cfg(feature = "BaseAudioContext")]
46    #[wasm_bindgen(catch, constructor, js_class = "AudioWorkletNode")]
47    #[doc = "The `new AudioWorkletNode(..)` constructor, creating a new instance of `AudioWorkletNode`."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/AudioWorkletNode)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`, `BaseAudioContext`*"]
52    pub fn new(context: &BaseAudioContext, name: &str) -> Result<AudioWorkletNode, JsValue>;
53    #[cfg(all(feature = "AudioWorkletNodeOptions", feature = "BaseAudioContext",))]
54    #[wasm_bindgen(catch, constructor, js_class = "AudioWorkletNode")]
55    #[doc = "The `new AudioWorkletNode(..)` constructor, creating a new instance of `AudioWorkletNode`."]
56    #[doc = ""]
57    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletNode/AudioWorkletNode)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `AudioWorkletNode`, `AudioWorkletNodeOptions`, `BaseAudioContext`*"]
60    pub fn new_with_options(
61        context: &BaseAudioContext,
62        name: &str,
63        options: &AudioWorkletNodeOptions,
64    ) -> Result<AudioWorkletNode, JsValue>;
65}