Skip to main content

web_sys/features/
gen_PresentationConnectionAvailableEventInit.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 = "::js_sys::Object",
9        js_name = "PresentationConnectionAvailableEventInit"
10    )]
11    #[derive(Debug, Clone, PartialEq, Eq)]
12    #[doc = "The `PresentationConnectionAvailableEventInit` dictionary."]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"]
15    pub type PresentationConnectionAvailableEventInit;
16    #[doc = "Get the `bubbles` field of this object."]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"]
19    #[wasm_bindgen(method, getter = "bubbles")]
20    pub fn get_bubbles(this: &PresentationConnectionAvailableEventInit) -> Option<bool>;
21    #[doc = "Change the `bubbles` field of this object."]
22    #[doc = ""]
23    #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"]
24    #[wasm_bindgen(method, setter = "bubbles")]
25    pub fn set_bubbles(this: &PresentationConnectionAvailableEventInit, val: bool);
26    #[doc = "Get the `cancelable` field of this object."]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"]
29    #[wasm_bindgen(method, getter = "cancelable")]
30    pub fn get_cancelable(this: &PresentationConnectionAvailableEventInit) -> Option<bool>;
31    #[doc = "Change the `cancelable` field of this object."]
32    #[doc = ""]
33    #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"]
34    #[wasm_bindgen(method, setter = "cancelable")]
35    pub fn set_cancelable(this: &PresentationConnectionAvailableEventInit, val: bool);
36    #[doc = "Get the `composed` field of this object."]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"]
39    #[wasm_bindgen(method, getter = "composed")]
40    pub fn get_composed(this: &PresentationConnectionAvailableEventInit) -> Option<bool>;
41    #[doc = "Change the `composed` field of this object."]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `PresentationConnectionAvailableEventInit`*"]
44    #[wasm_bindgen(method, setter = "composed")]
45    pub fn set_composed(this: &PresentationConnectionAvailableEventInit, val: bool);
46    #[cfg(feature = "PresentationConnection")]
47    #[doc = "Get the `connection` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionAvailableEventInit`*"]
50    #[wasm_bindgen(method, getter = "connection")]
51    pub fn get_connection(
52        this: &PresentationConnectionAvailableEventInit,
53    ) -> PresentationConnection;
54    #[cfg(feature = "PresentationConnection")]
55    #[doc = "Change the `connection` field of this object."]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionAvailableEventInit`*"]
58    #[wasm_bindgen(method, setter = "connection")]
59    pub fn set_connection(
60        this: &PresentationConnectionAvailableEventInit,
61        val: &PresentationConnection,
62    );
63}
64impl PresentationConnectionAvailableEventInit {
65    #[cfg(feature = "PresentationConnection")]
66    #[doc = "Construct a new `PresentationConnectionAvailableEventInit`."]
67    #[doc = ""]
68    #[doc = "*This API requires the following crate features to be activated: `PresentationConnection`, `PresentationConnectionAvailableEventInit`*"]
69    pub fn new(connection: &PresentationConnection) -> Self {
70        #[allow(unused_mut)]
71        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
72        ret.set_connection(connection);
73        ret
74    }
75    #[deprecated = "Use `set_bubbles()` instead."]
76    pub fn bubbles(&mut self, val: bool) -> &mut Self {
77        self.set_bubbles(val);
78        self
79    }
80    #[deprecated = "Use `set_cancelable()` instead."]
81    pub fn cancelable(&mut self, val: bool) -> &mut Self {
82        self.set_cancelable(val);
83        self
84    }
85    #[deprecated = "Use `set_composed()` instead."]
86    pub fn composed(&mut self, val: bool) -> &mut Self {
87        self.set_composed(val);
88        self
89    }
90    #[cfg(feature = "PresentationConnection")]
91    #[deprecated = "Use `set_connection()` instead."]
92    pub fn connection(&mut self, val: &PresentationConnection) -> &mut Self {
93        self.set_connection(val);
94        self
95    }
96}