1 #![allow(unused_imports)]
4 use wasm_bindgen
::prelude
::*;
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = PresentationConnectionCloseEventInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `PresentationConnectionCloseEventInit` dictionary."]
11 #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"]
12 pub type PresentationConnectionCloseEventInit
;
14 impl PresentationConnectionCloseEventInit
{
15 #[cfg(feature = "PresentationConnectionClosedReason")]
16 #[doc = "Construct a new `PresentationConnectionCloseEventInit`."]
18 #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`, `PresentationConnectionClosedReason`*"]
19 pub fn new(reason
: PresentationConnectionClosedReason
) -> Self {
21 let mut ret
: Self = ::wasm_bindgen
::JsCast
::unchecked_into(::js_sys
::Object
::new());
25 #[doc = "Change the `bubbles` field of this object."]
27 #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"]
28 pub fn bubbles(&mut self, val
: bool
) -> &mut Self {
29 use wasm_bindgen
::JsValue
;
30 let r
= ::js_sys
::Reflect
::set(
32 &JsValue
::from("bubbles"),
37 "setting properties should never fail on our dictionary objects"
42 #[doc = "Change the `cancelable` field of this object."]
44 #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"]
45 pub fn cancelable(&mut self, val
: bool
) -> &mut Self {
46 use wasm_bindgen
::JsValue
;
47 let r
= ::js_sys
::Reflect
::set(
49 &JsValue
::from("cancelable"),
54 "setting properties should never fail on our dictionary objects"
59 #[doc = "Change the `composed` field of this object."]
61 #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"]
62 pub fn composed(&mut self, val
: bool
) -> &mut Self {
63 use wasm_bindgen
::JsValue
;
64 let r
= ::js_sys
::Reflect
::set(
66 &JsValue
::from("composed"),
71 "setting properties should never fail on our dictionary objects"
76 #[doc = "Change the `message` field of this object."]
78 #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`*"]
79 pub fn message(&mut self, val
: &str) -> &mut Self {
80 use wasm_bindgen
::JsValue
;
81 let r
= ::js_sys
::Reflect
::set(
83 &JsValue
::from("message"),
88 "setting properties should never fail on our dictionary objects"
93 #[cfg(feature = "PresentationConnectionClosedReason")]
94 #[doc = "Change the `reason` field of this object."]
96 #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionCloseEventInit`, `PresentationConnectionClosedReason`*"]
97 pub fn reason(&mut self, val
: PresentationConnectionClosedReason
) -> &mut Self {
98 use wasm_bindgen
::JsValue
;
100 ::js_sys
::Reflect
::set(self.as_ref(), &JsValue
::from("reason"), &JsValue
::from(val
));
103 "setting properties should never fail on our dictionary objects"