1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "EventTarget",
9 extends = "::js_sys::Object",
10 js_name = "Navigation",
11 typescript_type = "Navigation"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `Navigation` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
19 pub type Navigation;
20 #[cfg(feature = "NavigationHistoryEntry")]
21 #[wasm_bindgen(method, getter, js_class = "Navigation", js_name = "currentEntry")]
22 #[doc = "Getter for the `currentEntry` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/currentEntry)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationHistoryEntry`*"]
27 pub fn current_entry(this: &Navigation) -> Option<NavigationHistoryEntry>;
28 #[cfg(feature = "NavigationTransition")]
29 #[wasm_bindgen(method, getter, js_class = "Navigation", js_name = "transition")]
30 #[doc = "Getter for the `transition` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/transition)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationTransition`*"]
35 pub fn transition(this: &Navigation) -> Option<NavigationTransition>;
36 #[cfg(feature = "NavigationActivation")]
37 #[wasm_bindgen(method, getter, js_class = "Navigation", js_name = "activation")]
38 #[doc = "Getter for the `activation` field of this object."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/activation)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationActivation`*"]
43 pub fn activation(this: &Navigation) -> Option<NavigationActivation>;
44 #[wasm_bindgen(method, getter, js_class = "Navigation", js_name = "canGoBack")]
45 #[doc = "Getter for the `canGoBack` field of this object."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/canGoBack)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
50 pub fn can_go_back(this: &Navigation) -> bool;
51 #[wasm_bindgen(method, getter, js_class = "Navigation", js_name = "canGoForward")]
52 #[doc = "Getter for the `canGoForward` field of this object."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/canGoForward)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
57 pub fn can_go_forward(this: &Navigation) -> bool;
58 #[wasm_bindgen(method, getter, js_class = "Navigation", js_name = "onnavigate")]
59 #[doc = "Getter for the `onnavigate` field of this object."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/onnavigate)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
64 pub fn onnavigate(this: &Navigation) -> Option<::js_sys::Function>;
65 #[wasm_bindgen(method, setter, js_class = "Navigation", js_name = "onnavigate")]
66 #[doc = "Setter for the `onnavigate` field of this object."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/onnavigate)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
71 pub fn set_onnavigate(this: &Navigation, value: Option<&::js_sys::Function>);
72 #[wasm_bindgen(method, getter, js_class = "Navigation", js_name = "onnavigatesuccess")]
73 #[doc = "Getter for the `onnavigatesuccess` field of this object."]
74 #[doc = ""]
75 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/onnavigatesuccess)"]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
78 pub fn onnavigatesuccess(this: &Navigation) -> Option<::js_sys::Function>;
79 #[wasm_bindgen(method, setter, js_class = "Navigation", js_name = "onnavigatesuccess")]
80 #[doc = "Setter for the `onnavigatesuccess` field of this object."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/onnavigatesuccess)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
85 pub fn set_onnavigatesuccess(this: &Navigation, value: Option<&::js_sys::Function>);
86 #[wasm_bindgen(method, getter, js_class = "Navigation", js_name = "onnavigateerror")]
87 #[doc = "Getter for the `onnavigateerror` field of this object."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/onnavigateerror)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
92 pub fn onnavigateerror(this: &Navigation) -> Option<::js_sys::Function>;
93 #[wasm_bindgen(method, setter, js_class = "Navigation", js_name = "onnavigateerror")]
94 #[doc = "Setter for the `onnavigateerror` field of this object."]
95 #[doc = ""]
96 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/onnavigateerror)"]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
99 pub fn set_onnavigateerror(this: &Navigation, value: Option<&::js_sys::Function>);
100 #[wasm_bindgen(
101 method,
102 getter,
103 js_class = "Navigation",
104 js_name = "oncurrententrychange"
105 )]
106 #[doc = "Getter for the `oncurrententrychange` field of this object."]
107 #[doc = ""]
108 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/oncurrententrychange)"]
109 #[doc = ""]
110 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
111 pub fn oncurrententrychange(this: &Navigation) -> Option<::js_sys::Function>;
112 #[wasm_bindgen(
113 method,
114 setter,
115 js_class = "Navigation",
116 js_name = "oncurrententrychange"
117 )]
118 #[doc = "Setter for the `oncurrententrychange` field of this object."]
119 #[doc = ""]
120 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/oncurrententrychange)"]
121 #[doc = ""]
122 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
123 pub fn set_oncurrententrychange(this: &Navigation, value: Option<&::js_sys::Function>);
124 #[cfg(feature = "NavigationResult")]
125 #[wasm_bindgen(method, js_class = "Navigation")]
126 #[doc = "The `back()` method."]
127 #[doc = ""]
128 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/back)"]
129 #[doc = ""]
130 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationResult`*"]
131 pub fn back(this: &Navigation) -> NavigationResult;
132 #[cfg(all(feature = "NavigationOptions", feature = "NavigationResult",))]
133 #[wasm_bindgen(method, js_class = "Navigation", js_name = "back")]
134 #[doc = "The `back()` method."]
135 #[doc = ""]
136 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/back)"]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationOptions`, `NavigationResult`*"]
139 pub fn back_with_options(this: &Navigation, options: &NavigationOptions) -> NavigationResult;
140 #[wasm_bindgen(method, js_class = "Navigation")]
141 #[doc = "The `entries()` method."]
142 #[doc = ""]
143 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/entries)"]
144 #[doc = ""]
145 #[doc = "*This API requires the following crate features to be activated: `Navigation`*"]
146 pub fn entries(this: &Navigation) -> ::js_sys::Array;
147 #[cfg(feature = "NavigationResult")]
148 #[wasm_bindgen(method, js_class = "Navigation")]
149 #[doc = "The `forward()` method."]
150 #[doc = ""]
151 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/forward)"]
152 #[doc = ""]
153 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationResult`*"]
154 pub fn forward(this: &Navigation) -> NavigationResult;
155 #[cfg(all(feature = "NavigationOptions", feature = "NavigationResult",))]
156 #[wasm_bindgen(method, js_class = "Navigation", js_name = "forward")]
157 #[doc = "The `forward()` method."]
158 #[doc = ""]
159 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/forward)"]
160 #[doc = ""]
161 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationOptions`, `NavigationResult`*"]
162 pub fn forward_with_options(this: &Navigation, options: &NavigationOptions)
163 -> NavigationResult;
164 #[cfg(feature = "NavigationResult")]
165 #[wasm_bindgen(method, js_class = "Navigation")]
166 #[doc = "The `navigate()` method."]
167 #[doc = ""]
168 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/navigate)"]
169 #[doc = ""]
170 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationResult`*"]
171 pub fn navigate(this: &Navigation, url: &str) -> NavigationResult;
172 #[cfg(all(feature = "NavigationNavigateOptions", feature = "NavigationResult",))]
173 #[wasm_bindgen(method, js_class = "Navigation", js_name = "navigate")]
174 #[doc = "The `navigate()` method."]
175 #[doc = ""]
176 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/navigate)"]
177 #[doc = ""]
178 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationNavigateOptions`, `NavigationResult`*"]
179 pub fn navigate_with_options(
180 this: &Navigation,
181 url: &str,
182 options: &NavigationNavigateOptions,
183 ) -> NavigationResult;
184 #[cfg(feature = "NavigationResult")]
185 #[wasm_bindgen(method, js_class = "Navigation")]
186 #[doc = "The `reload()` method."]
187 #[doc = ""]
188 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/reload)"]
189 #[doc = ""]
190 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationResult`*"]
191 pub fn reload(this: &Navigation) -> NavigationResult;
192 #[cfg(all(feature = "NavigationReloadOptions", feature = "NavigationResult",))]
193 #[wasm_bindgen(method, js_class = "Navigation", js_name = "reload")]
194 #[doc = "The `reload()` method."]
195 #[doc = ""]
196 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/reload)"]
197 #[doc = ""]
198 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationReloadOptions`, `NavigationResult`*"]
199 pub fn reload_with_options(
200 this: &Navigation,
201 options: &NavigationReloadOptions,
202 ) -> NavigationResult;
203 #[cfg(feature = "NavigationResult")]
204 #[wasm_bindgen(method, js_class = "Navigation", js_name = "traverseTo")]
205 #[doc = "The `traverseTo()` method."]
206 #[doc = ""]
207 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/traverseTo)"]
208 #[doc = ""]
209 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationResult`*"]
210 pub fn traverse_to(this: &Navigation, key: &str) -> NavigationResult;
211 #[cfg(all(feature = "NavigationOptions", feature = "NavigationResult",))]
212 #[wasm_bindgen(method, js_class = "Navigation", js_name = "traverseTo")]
213 #[doc = "The `traverseTo()` method."]
214 #[doc = ""]
215 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/traverseTo)"]
216 #[doc = ""]
217 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationOptions`, `NavigationResult`*"]
218 pub fn traverse_to_with_options(
219 this: &Navigation,
220 key: &str,
221 options: &NavigationOptions,
222 ) -> NavigationResult;
223 #[cfg(feature = "NavigationUpdateCurrentEntryOptions")]
224 #[wasm_bindgen(method, js_class = "Navigation", js_name = "updateCurrentEntry")]
225 #[doc = "The `updateCurrentEntry()` method."]
226 #[doc = ""]
227 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigation/updateCurrentEntry)"]
228 #[doc = ""]
229 #[doc = "*This API requires the following crate features to be activated: `Navigation`, `NavigationUpdateCurrentEntryOptions`*"]
230 pub fn update_current_entry(this: &Navigation, options: &NavigationUpdateCurrentEntryOptions);
231}