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