web_sys/features/
gen_NavigateEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "Event",
9 extends = "::js_sys::Object",
10 js_name = "NavigateEvent",
11 typescript_type = "NavigateEvent"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `NavigateEvent` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`*"]
19 pub type NavigateEvent;
20 #[cfg(feature = "NavigationApiType")]
21 #[wasm_bindgen(method, getter, js_class = "NavigateEvent", js_name = "navigationType")]
22 #[doc = "Getter for the `navigationType` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/navigationType)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`, `NavigationApiType`*"]
27 pub fn navigation_type(this: &NavigateEvent) -> NavigationApiType;
28 #[cfg(feature = "NavigationDestination")]
29 #[wasm_bindgen(method, getter, js_class = "NavigateEvent", js_name = "destination")]
30 #[doc = "Getter for the `destination` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/destination)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`, `NavigationDestination`*"]
35 pub fn destination(this: &NavigateEvent) -> NavigationDestination;
36 #[wasm_bindgen(method, getter, js_class = "NavigateEvent", js_name = "canIntercept")]
37 #[doc = "Getter for the `canIntercept` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/canIntercept)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`*"]
42 pub fn can_intercept(this: &NavigateEvent) -> bool;
43 #[wasm_bindgen(method, getter, js_class = "NavigateEvent", js_name = "userInitiated")]
44 #[doc = "Getter for the `userInitiated` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/userInitiated)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`*"]
49 pub fn user_initiated(this: &NavigateEvent) -> bool;
50 #[wasm_bindgen(method, getter, js_class = "NavigateEvent", js_name = "hashChange")]
51 #[doc = "Getter for the `hashChange` field of this object."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/hashChange)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`*"]
56 pub fn hash_change(this: &NavigateEvent) -> bool;
57 #[cfg(feature = "AbortSignal")]
58 #[wasm_bindgen(method, getter, js_class = "NavigateEvent", js_name = "signal")]
59 #[doc = "Getter for the `signal` field of this object."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/signal)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `AbortSignal`, `NavigateEvent`*"]
64 pub fn signal(this: &NavigateEvent) -> AbortSignal;
65 #[cfg(feature = "FormData")]
66 #[wasm_bindgen(method, getter, js_class = "NavigateEvent", js_name = "formData")]
67 #[doc = "Getter for the `formData` field of this object."]
68 #[doc = ""]
69 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/formData)"]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `FormData`, `NavigateEvent`*"]
72 pub fn form_data(this: &NavigateEvent) -> Option<FormData>;
73 #[wasm_bindgen(
74 method,
75 getter,
76 js_class = "NavigateEvent",
77 js_name = "downloadRequest"
78 )]
79 #[doc = "Getter for the `downloadRequest` field of this object."]
80 #[doc = ""]
81 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/downloadRequest)"]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`*"]
84 pub fn download_request(this: &NavigateEvent) -> Option<::alloc::string::String>;
85 #[wasm_bindgen(method, getter, js_class = "NavigateEvent", js_name = "info")]
86 #[doc = "Getter for the `info` field of this object."]
87 #[doc = ""]
88 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/info)"]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`*"]
91 pub fn info(this: &NavigateEvent) -> ::wasm_bindgen::JsValue;
92 #[wasm_bindgen(
93 method,
94 getter,
95 js_class = "NavigateEvent",
96 js_name = "hasUAVisualTransition"
97 )]
98 #[doc = "Getter for the `hasUAVisualTransition` field of this object."]
99 #[doc = ""]
100 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/hasUAVisualTransition)"]
101 #[doc = ""]
102 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`*"]
103 pub fn has_ua_visual_transition(this: &NavigateEvent) -> bool;
104 #[cfg(feature = "Element")]
105 #[wasm_bindgen(method, getter, js_class = "NavigateEvent", js_name = "sourceElement")]
106 #[doc = "Getter for the `sourceElement` field of this object."]
107 #[doc = ""]
108 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/sourceElement)"]
109 #[doc = ""]
110 #[doc = "*This API requires the following crate features to be activated: `Element`, `NavigateEvent`*"]
111 pub fn source_element(this: &NavigateEvent) -> Option<Element>;
112 #[cfg(feature = "NavigateEventInit")]
113 #[wasm_bindgen(catch, constructor, js_class = "NavigateEvent")]
114 #[doc = "The `new NavigateEvent(..)` constructor, creating a new instance of `NavigateEvent`."]
115 #[doc = ""]
116 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/NavigateEvent)"]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`, `NavigateEventInit`*"]
119 pub fn new(type_: &str, event_init_dict: &NavigateEventInit) -> Result<NavigateEvent, JsValue>;
120 #[wasm_bindgen(catch, method, js_class = "NavigateEvent")]
121 #[doc = "The `intercept()` method."]
122 #[doc = ""]
123 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/intercept)"]
124 #[doc = ""]
125 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`*"]
126 pub fn intercept(this: &NavigateEvent) -> Result<(), JsValue>;
127 #[cfg(feature = "NavigationInterceptOptions")]
128 #[wasm_bindgen(catch, method, js_class = "NavigateEvent", js_name = "intercept")]
129 #[doc = "The `intercept()` method."]
130 #[doc = ""]
131 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/intercept)"]
132 #[doc = ""]
133 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`, `NavigationInterceptOptions`*"]
134 pub fn intercept_with_options(
135 this: &NavigateEvent,
136 options: &NavigationInterceptOptions,
137 ) -> Result<(), JsValue>;
138 #[wasm_bindgen(catch, method, js_class = "NavigateEvent")]
139 #[doc = "The `scroll()` method."]
140 #[doc = ""]
141 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/scroll)"]
142 #[doc = ""]
143 #[doc = "*This API requires the following crate features to be activated: `NavigateEvent`*"]
144 pub fn scroll(this: &NavigateEvent) -> Result<(), JsValue>;
145}