web_sys/features/
gen_NavigateEventInit.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 = "NavigateEventInit")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `NavigateEventInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
12 pub type NavigateEventInit;
13 #[doc = "Get the `bubbles` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
16 #[wasm_bindgen(method, getter = "bubbles")]
17 pub fn get_bubbles(this: &NavigateEventInit) -> 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: `NavigateEventInit`*"]
21 #[wasm_bindgen(method, setter = "bubbles")]
22 pub fn set_bubbles(this: &NavigateEventInit, 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: `NavigateEventInit`*"]
26 #[wasm_bindgen(method, getter = "cancelable")]
27 pub fn get_cancelable(this: &NavigateEventInit) -> 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: `NavigateEventInit`*"]
31 #[wasm_bindgen(method, setter = "cancelable")]
32 pub fn set_cancelable(this: &NavigateEventInit, 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: `NavigateEventInit`*"]
36 #[wasm_bindgen(method, getter = "composed")]
37 pub fn get_composed(this: &NavigateEventInit) -> 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: `NavigateEventInit`*"]
41 #[wasm_bindgen(method, setter = "composed")]
42 pub fn set_composed(this: &NavigateEventInit, val: bool);
43 #[doc = "Get the `canIntercept` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
46 #[wasm_bindgen(method, getter = "canIntercept")]
47 pub fn get_can_intercept(this: &NavigateEventInit) -> Option<bool>;
48 #[doc = "Change the `canIntercept` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
51 #[wasm_bindgen(method, setter = "canIntercept")]
52 pub fn set_can_intercept(this: &NavigateEventInit, val: bool);
53 #[cfg(feature = "NavigationDestination")]
54 #[doc = "Get the `destination` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`, `NavigationDestination`*"]
57 #[wasm_bindgen(method, getter = "destination")]
58 pub fn get_destination(this: &NavigateEventInit) -> NavigationDestination;
59 #[cfg(feature = "NavigationDestination")]
60 #[doc = "Change the `destination` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`, `NavigationDestination`*"]
63 #[wasm_bindgen(method, setter = "destination")]
64 pub fn set_destination(this: &NavigateEventInit, val: &NavigationDestination);
65 #[doc = "Get the `downloadRequest` field of this object."]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
68 #[wasm_bindgen(method, getter = "downloadRequest")]
69 pub fn get_download_request(this: &NavigateEventInit) -> Option<::alloc::string::String>;
70 #[doc = "Change the `downloadRequest` field of this object."]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
73 #[wasm_bindgen(method, setter = "downloadRequest")]
74 pub fn set_download_request(this: &NavigateEventInit, val: Option<&str>);
75 #[cfg(feature = "FormData")]
76 #[doc = "Get the `formData` field of this object."]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `FormData`, `NavigateEventInit`*"]
79 #[wasm_bindgen(method, getter = "formData")]
80 pub fn get_form_data(this: &NavigateEventInit) -> Option<FormData>;
81 #[cfg(feature = "FormData")]
82 #[doc = "Change the `formData` field of this object."]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `FormData`, `NavigateEventInit`*"]
85 #[wasm_bindgen(method, setter = "formData")]
86 pub fn set_form_data(this: &NavigateEventInit, val: Option<&FormData>);
87 #[doc = "Get the `hasUAVisualTransition` field of this object."]
88 #[doc = ""]
89 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
90 #[wasm_bindgen(method, getter = "hasUAVisualTransition")]
91 pub fn get_has_ua_visual_transition(this: &NavigateEventInit) -> Option<bool>;
92 #[doc = "Change the `hasUAVisualTransition` field of this object."]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
95 #[wasm_bindgen(method, setter = "hasUAVisualTransition")]
96 pub fn set_has_ua_visual_transition(this: &NavigateEventInit, val: bool);
97 #[doc = "Get the `hashChange` field of this object."]
98 #[doc = ""]
99 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
100 #[wasm_bindgen(method, getter = "hashChange")]
101 pub fn get_hash_change(this: &NavigateEventInit) -> Option<bool>;
102 #[doc = "Change the `hashChange` field of this object."]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
105 #[wasm_bindgen(method, setter = "hashChange")]
106 pub fn set_hash_change(this: &NavigateEventInit, val: bool);
107 #[doc = "Get the `info` field of this object."]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
110 #[wasm_bindgen(method, getter = "info")]
111 pub fn get_info(this: &NavigateEventInit) -> ::wasm_bindgen::JsValue;
112 #[doc = "Change the `info` field of this object."]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
115 #[wasm_bindgen(method, setter = "info")]
116 pub fn set_info(this: &NavigateEventInit, val: &::wasm_bindgen::JsValue);
117 #[cfg(feature = "NavigationApiType")]
118 #[doc = "Get the `navigationType` field of this object."]
119 #[doc = ""]
120 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`, `NavigationApiType`*"]
121 #[wasm_bindgen(method, getter = "navigationType")]
122 pub fn get_navigation_type(this: &NavigateEventInit) -> Option<NavigationApiType>;
123 #[cfg(feature = "NavigationApiType")]
124 #[doc = "Change the `navigationType` field of this object."]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`, `NavigationApiType`*"]
127 #[wasm_bindgen(method, setter = "navigationType")]
128 pub fn set_navigation_type(this: &NavigateEventInit, val: NavigationApiType);
129 #[cfg(feature = "AbortSignal")]
130 #[doc = "Get the `signal` field of this object."]
131 #[doc = ""]
132 #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `NavigateEventInit`*"]
133 #[wasm_bindgen(method, getter = "signal")]
134 pub fn get_signal(this: &NavigateEventInit) -> AbortSignal;
135 #[cfg(feature = "AbortSignal")]
136 #[doc = "Change the `signal` field of this object."]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `NavigateEventInit`*"]
139 #[wasm_bindgen(method, setter = "signal")]
140 pub fn set_signal(this: &NavigateEventInit, val: &AbortSignal);
141 #[cfg(feature = "Element")]
142 #[doc = "Get the `sourceElement` field of this object."]
143 #[doc = ""]
144 #[doc = "*This API requires the following crate features to be activated: `Element`, `NavigateEventInit`*"]
145 #[wasm_bindgen(method, getter = "sourceElement")]
146 pub fn get_source_element(this: &NavigateEventInit) -> Option<Element>;
147 #[cfg(feature = "Element")]
148 #[doc = "Change the `sourceElement` field of this object."]
149 #[doc = ""]
150 #[doc = "*This API requires the following crate features to be activated: `Element`, `NavigateEventInit`*"]
151 #[wasm_bindgen(method, setter = "sourceElement")]
152 pub fn set_source_element(this: &NavigateEventInit, val: Option<&Element>);
153 #[doc = "Get the `userInitiated` field of this object."]
154 #[doc = ""]
155 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
156 #[wasm_bindgen(method, getter = "userInitiated")]
157 pub fn get_user_initiated(this: &NavigateEventInit) -> Option<bool>;
158 #[doc = "Change the `userInitiated` field of this object."]
159 #[doc = ""]
160 #[doc = "*This API requires the following crate features to be activated: `NavigateEventInit`*"]
161 #[wasm_bindgen(method, setter = "userInitiated")]
162 pub fn set_user_initiated(this: &NavigateEventInit, val: bool);
163}
164impl NavigateEventInit {
165 #[cfg(all(feature = "AbortSignal", feature = "NavigationDestination",))]
166 #[doc = "Construct a new `NavigateEventInit`."]
167 #[doc = ""]
168 #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `NavigateEventInit`, `NavigationDestination`*"]
169 pub fn new(destination: &NavigationDestination, signal: &AbortSignal) -> Self {
170 #[allow(unused_mut)]
171 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
172 ret.set_destination(destination);
173 ret.set_signal(signal);
174 ret
175 }
176 #[deprecated = "Use `set_bubbles()` instead."]
177 pub fn bubbles(&mut self, val: bool) -> &mut Self {
178 self.set_bubbles(val);
179 self
180 }
181 #[deprecated = "Use `set_cancelable()` instead."]
182 pub fn cancelable(&mut self, val: bool) -> &mut Self {
183 self.set_cancelable(val);
184 self
185 }
186 #[deprecated = "Use `set_composed()` instead."]
187 pub fn composed(&mut self, val: bool) -> &mut Self {
188 self.set_composed(val);
189 self
190 }
191 #[deprecated = "Use `set_can_intercept()` instead."]
192 pub fn can_intercept(&mut self, val: bool) -> &mut Self {
193 self.set_can_intercept(val);
194 self
195 }
196 #[cfg(feature = "NavigationDestination")]
197 #[deprecated = "Use `set_destination()` instead."]
198 pub fn destination(&mut self, val: &NavigationDestination) -> &mut Self {
199 self.set_destination(val);
200 self
201 }
202 #[deprecated = "Use `set_download_request()` instead."]
203 pub fn download_request(&mut self, val: Option<&str>) -> &mut Self {
204 self.set_download_request(val);
205 self
206 }
207 #[cfg(feature = "FormData")]
208 #[deprecated = "Use `set_form_data()` instead."]
209 pub fn form_data(&mut self, val: Option<&FormData>) -> &mut Self {
210 self.set_form_data(val);
211 self
212 }
213 #[deprecated = "Use `set_has_ua_visual_transition()` instead."]
214 pub fn has_ua_visual_transition(&mut self, val: bool) -> &mut Self {
215 self.set_has_ua_visual_transition(val);
216 self
217 }
218 #[deprecated = "Use `set_hash_change()` instead."]
219 pub fn hash_change(&mut self, val: bool) -> &mut Self {
220 self.set_hash_change(val);
221 self
222 }
223 #[deprecated = "Use `set_info()` instead."]
224 pub fn info(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
225 self.set_info(val);
226 self
227 }
228 #[cfg(feature = "NavigationApiType")]
229 #[deprecated = "Use `set_navigation_type()` instead."]
230 pub fn navigation_type(&mut self, val: NavigationApiType) -> &mut Self {
231 self.set_navigation_type(val);
232 self
233 }
234 #[cfg(feature = "AbortSignal")]
235 #[deprecated = "Use `set_signal()` instead."]
236 pub fn signal(&mut self, val: &AbortSignal) -> &mut Self {
237 self.set_signal(val);
238 self
239 }
240 #[cfg(feature = "Element")]
241 #[deprecated = "Use `set_source_element()` instead."]
242 pub fn source_element(&mut self, val: Option<&Element>) -> &mut Self {
243 self.set_source_element(val);
244 self
245 }
246 #[deprecated = "Use `set_user_initiated()` instead."]
247 pub fn user_initiated(&mut self, val: bool) -> &mut Self {
248 self.set_user_initiated(val);
249 self
250 }
251}