maxcountryman_web_sys/features/
gen_RtcDataChannelEvent.rs

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