1#![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 = MessageChannel , typescript_type = "MessageChannel")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `MessageChannel` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `MessageChannel`*"]
14 pub type MessageChannel;
15 #[cfg(feature = "MessagePort")]
16 # [wasm_bindgen (structural , method , getter , js_class = "MessageChannel" , js_name = port1)]
17 #[doc = "Getter for the `port1` field of this object."]
18 #[doc = ""]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel/port1)"]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `MessageChannel`, `MessagePort`*"]
22 pub fn port1(this: &MessageChannel) -> MessagePort;
23 #[cfg(feature = "MessagePort")]
24 # [wasm_bindgen (structural , method , getter , js_class = "MessageChannel" , js_name = port2)]
25 #[doc = "Getter for the `port2` field of this object."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel/port2)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `MessageChannel`, `MessagePort`*"]
30 pub fn port2(this: &MessageChannel) -> MessagePort;
31 #[wasm_bindgen(catch, constructor, js_class = "MessageChannel")]
32 #[doc = "The `new MessageChannel(..)` constructor, creating a new instance of `MessageChannel`."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel/MessageChannel)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `MessageChannel`*"]
37 pub fn new() -> Result<MessageChannel, JsValue>;
38}
39