Skip to main content

web_sys/features/
gen_PresentationConnectionCloseEvent.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "Event",
9        extends = "::js_sys::Object",
10        js_name = "PresentationConnectionCloseEvent",
11        typescript_type = "PresentationConnectionCloseEvent"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `PresentationConnectionCloseEvent` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionCloseEvent)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEvent`*"]
19    pub type PresentationConnectionCloseEvent;
20    #[cfg(feature = "PresentationConnectionClosedReason")]
21    #[wasm_bindgen(
22        method,
23        getter,
24        js_class = "PresentationConnectionCloseEvent",
25        js_name = "reason"
26    )]
27    #[doc = "Getter for the `reason` field of this object."]
28    #[doc = ""]
29    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionCloseEvent/reason)"]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEvent`, `PresentationConnectionClosedReason`*"]
32    pub fn reason(this: &PresentationConnectionCloseEvent) -> PresentationConnectionClosedReason;
33    #[wasm_bindgen(
34        method,
35        getter,
36        js_class = "PresentationConnectionCloseEvent",
37        js_name = "message"
38    )]
39    #[doc = "Getter for the `message` field of this object."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionCloseEvent/message)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEvent`*"]
44    pub fn message(this: &PresentationConnectionCloseEvent) -> ::alloc::string::String;
45    #[cfg(feature = "PresentationConnectionCloseEventInit")]
46    #[wasm_bindgen(catch, constructor, js_class = "PresentationConnectionCloseEvent")]
47    #[doc = "The `new PresentationConnectionCloseEvent(..)` constructor, creating a new instance of `PresentationConnectionCloseEvent`."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PresentationConnectionCloseEvent/PresentationConnectionCloseEvent)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEvent`, `PresentationConnectionCloseEventInit`*"]
52    pub fn new(
53        type_: &str,
54        event_init_dict: &PresentationConnectionCloseEventInit,
55    ) -> Result<PresentationConnectionCloseEvent, JsValue>;
56}