maxcountryman_web_sys/features/
gen_AudioWorkletNode.rs

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