maxcountryman_web_sys/features/
gen_MidiConnectionEvent.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = MIDIConnectionEvent , typescript_type = "MIDIConnectionEvent")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `MidiConnectionEvent` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIConnectionEvent)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEvent`*"]
13 pub type MidiConnectionEvent;
14 #[cfg(feature = "MidiPort")]
15 # [wasm_bindgen (structural , method , getter , js_class = "MIDIConnectionEvent" , js_name = port)]
16 #[doc = "Getter for the `port` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIConnectionEvent/port)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEvent`, `MidiPort`*"]
21 pub fn port(this: &MidiConnectionEvent) -> Option<MidiPort>;
22 #[wasm_bindgen(catch, constructor, js_class = "MIDIConnectionEvent")]
23 #[doc = "The `new MidiConnectionEvent(..)` constructor, creating a new instance of `MidiConnectionEvent`."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIConnectionEvent/MIDIConnectionEvent)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEvent`*"]
28 pub fn new(type_: &str) -> Result<MidiConnectionEvent, JsValue>;
29 #[cfg(feature = "MidiConnectionEventInit")]
30 #[wasm_bindgen(catch, constructor, js_class = "MIDIConnectionEvent")]
31 #[doc = "The `new MidiConnectionEvent(..)` constructor, creating a new instance of `MidiConnectionEvent`."]
32 #[doc = ""]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MIDIConnectionEvent/MIDIConnectionEvent)"]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `MidiConnectionEvent`, `MidiConnectionEventInit`*"]
36 pub fn new_with_event_init_dict(
37 type_: &str,
38 event_init_dict: &MidiConnectionEventInit,
39 ) -> Result<MidiConnectionEvent, JsValue>;
40}