web_sys/features/
gen_PopupBlockedEventInit.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = PopupBlockedEventInit)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `PopupBlockedEventInit` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
12    pub type PopupBlockedEventInit;
13    #[doc = "Get the `bubbles` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
16    #[wasm_bindgen(method, getter = "bubbles")]
17    pub fn get_bubbles(this: &PopupBlockedEventInit) -> Option<bool>;
18    #[doc = "Change the `bubbles` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
21    #[wasm_bindgen(method, setter = "bubbles")]
22    pub fn set_bubbles(this: &PopupBlockedEventInit, val: bool);
23    #[doc = "Get the `cancelable` field of this object."]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
26    #[wasm_bindgen(method, getter = "cancelable")]
27    pub fn get_cancelable(this: &PopupBlockedEventInit) -> Option<bool>;
28    #[doc = "Change the `cancelable` field of this object."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
31    #[wasm_bindgen(method, setter = "cancelable")]
32    pub fn set_cancelable(this: &PopupBlockedEventInit, val: bool);
33    #[doc = "Get the `composed` field of this object."]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
36    #[wasm_bindgen(method, getter = "composed")]
37    pub fn get_composed(this: &PopupBlockedEventInit) -> Option<bool>;
38    #[doc = "Change the `composed` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
41    #[wasm_bindgen(method, setter = "composed")]
42    pub fn set_composed(this: &PopupBlockedEventInit, val: bool);
43    #[doc = "Get the `popupWindowFeatures` field of this object."]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
46    #[wasm_bindgen(method, getter = "popupWindowFeatures")]
47    pub fn get_popup_window_features(
48        this: &PopupBlockedEventInit,
49    ) -> Option<::alloc::string::String>;
50    #[doc = "Change the `popupWindowFeatures` field of this object."]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
53    #[wasm_bindgen(method, setter = "popupWindowFeatures")]
54    pub fn set_popup_window_features(this: &PopupBlockedEventInit, val: &str);
55    #[doc = "Get the `popupWindowName` field of this object."]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
58    #[wasm_bindgen(method, getter = "popupWindowName")]
59    pub fn get_popup_window_name(this: &PopupBlockedEventInit) -> Option<::alloc::string::String>;
60    #[doc = "Change the `popupWindowName` field of this object."]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
63    #[wasm_bindgen(method, setter = "popupWindowName")]
64    pub fn set_popup_window_name(this: &PopupBlockedEventInit, val: &str);
65    #[cfg(feature = "Window")]
66    #[doc = "Get the `requestingWindow` field of this object."]
67    #[doc = ""]
68    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`, `Window`*"]
69    #[wasm_bindgen(method, getter = "requestingWindow")]
70    pub fn get_requesting_window(this: &PopupBlockedEventInit) -> Option<Window>;
71    #[cfg(feature = "Window")]
72    #[doc = "Change the `requestingWindow` field of this object."]
73    #[doc = ""]
74    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`, `Window`*"]
75    #[wasm_bindgen(method, setter = "requestingWindow")]
76    pub fn set_requesting_window(this: &PopupBlockedEventInit, val: Option<&Window>);
77}
78impl PopupBlockedEventInit {
79    #[doc = "Construct a new `PopupBlockedEventInit`."]
80    #[doc = ""]
81    #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
82    pub fn new() -> Self {
83        #[allow(unused_mut)]
84        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
85        ret
86    }
87    #[deprecated = "Use `set_bubbles()` instead."]
88    pub fn bubbles(&mut self, val: bool) -> &mut Self {
89        self.set_bubbles(val);
90        self
91    }
92    #[deprecated = "Use `set_cancelable()` instead."]
93    pub fn cancelable(&mut self, val: bool) -> &mut Self {
94        self.set_cancelable(val);
95        self
96    }
97    #[deprecated = "Use `set_composed()` instead."]
98    pub fn composed(&mut self, val: bool) -> &mut Self {
99        self.set_composed(val);
100        self
101    }
102    #[deprecated = "Use `set_popup_window_features()` instead."]
103    pub fn popup_window_features(&mut self, val: &str) -> &mut Self {
104        self.set_popup_window_features(val);
105        self
106    }
107    #[deprecated = "Use `set_popup_window_name()` instead."]
108    pub fn popup_window_name(&mut self, val: &str) -> &mut Self {
109        self.set_popup_window_name(val);
110        self
111    }
112    #[cfg(feature = "Window")]
113    #[deprecated = "Use `set_requesting_window()` instead."]
114    pub fn requesting_window(&mut self, val: Option<&Window>) -> &mut Self {
115        self.set_requesting_window(val);
116        self
117    }
118}
119impl Default for PopupBlockedEventInit {
120    fn default() -> Self {
121        Self::new()
122    }
123}