web_sys/features/
gen_PopupBlockedEventInit.rs1#![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 #[doc = "Get the `popupWindowURI` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
68 #[wasm_bindgen(method, getter = "popupWindowURI")]
69 pub fn get_popup_window_uri(this: &PopupBlockedEventInit) -> Option<::alloc::string::String>;
70 #[doc = "Change the `popupWindowURI` field of this object."]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
73 #[wasm_bindgen(method, setter = "popupWindowURI")]
74 pub fn set_popup_window_uri(this: &PopupBlockedEventInit, val: Option<&str>);
75 #[cfg(feature = "Window")]
76 #[doc = "Get the `requestingWindow` field of this object."]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`, `Window`*"]
79 #[wasm_bindgen(method, getter = "requestingWindow")]
80 pub fn get_requesting_window(this: &PopupBlockedEventInit) -> Option<Window>;
81 #[cfg(feature = "Window")]
82 #[doc = "Change the `requestingWindow` field of this object."]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`, `Window`*"]
85 #[wasm_bindgen(method, setter = "requestingWindow")]
86 pub fn set_requesting_window(this: &PopupBlockedEventInit, val: Option<&Window>);
87}
88impl PopupBlockedEventInit {
89 #[doc = "Construct a new `PopupBlockedEventInit`."]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `PopupBlockedEventInit`*"]
92 pub fn new() -> Self {
93 #[allow(unused_mut)]
94 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
95 ret
96 }
97 #[deprecated = "Use `set_bubbles()` instead."]
98 pub fn bubbles(&mut self, val: bool) -> &mut Self {
99 self.set_bubbles(val);
100 self
101 }
102 #[deprecated = "Use `set_cancelable()` instead."]
103 pub fn cancelable(&mut self, val: bool) -> &mut Self {
104 self.set_cancelable(val);
105 self
106 }
107 #[deprecated = "Use `set_composed()` instead."]
108 pub fn composed(&mut self, val: bool) -> &mut Self {
109 self.set_composed(val);
110 self
111 }
112 #[deprecated = "Use `set_popup_window_features()` instead."]
113 pub fn popup_window_features(&mut self, val: &str) -> &mut Self {
114 self.set_popup_window_features(val);
115 self
116 }
117 #[deprecated = "Use `set_popup_window_name()` instead."]
118 pub fn popup_window_name(&mut self, val: &str) -> &mut Self {
119 self.set_popup_window_name(val);
120 self
121 }
122 #[deprecated = "Use `set_popup_window_uri()` instead."]
123 pub fn popup_window_uri(&mut self, val: Option<&str>) -> &mut Self {
124 self.set_popup_window_uri(val);
125 self
126 }
127 #[cfg(feature = "Window")]
128 #[deprecated = "Use `set_requesting_window()` instead."]
129 pub fn requesting_window(&mut self, val: Option<&Window>) -> &mut Self {
130 self.set_requesting_window(val);
131 self
132 }
133}
134impl Default for PopupBlockedEventInit {
135 fn default() -> Self {
136 Self::new()
137 }
138}