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 = Navigator , typescript_type = "Navigator")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `Navigator` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
14 pub type Navigator;
15 #[cfg(feature = "Clipboard")]
16 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = clipboard)]
17 #[doc = "Getter for the `clipboard` field of this object."]
18 #[doc = ""]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/clipboard)"]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `Clipboard`, `Navigator`*"]
22 pub fn clipboard(this: &Navigator) -> Clipboard;
23 #[cfg(feature = "Permissions")]
24 # [wasm_bindgen (structural , catch , method , getter , js_class = "Navigator" , js_name = permissions)]
25 #[doc = "Getter for the `permissions` field of this object."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/permissions)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `Permissions`*"]
30 pub fn permissions(this: &Navigator) -> Result<Permissions, JsValue>;
31 #[cfg(feature = "MimeTypeArray")]
32 # [wasm_bindgen (structural , catch , method , getter , js_class = "Navigator" , js_name = mimeTypes)]
33 #[doc = "Getter for the `mimeTypes` field of this object."]
34 #[doc = ""]
35 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mimeTypes)"]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `MimeTypeArray`, `Navigator`*"]
38 pub fn mime_types(this: &Navigator) -> Result<MimeTypeArray, JsValue>;
39 #[cfg(feature = "PluginArray")]
40 # [wasm_bindgen (structural , catch , method , getter , js_class = "Navigator" , js_name = plugins)]
41 #[doc = "Getter for the `plugins` field of this object."]
42 #[doc = ""]
43 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/plugins)"]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `PluginArray`*"]
46 pub fn plugins(this: &Navigator) -> Result<PluginArray, JsValue>;
47 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = doNotTrack)]
48 #[doc = "Getter for the `doNotTrack` field of this object."]
49 #[doc = ""]
50 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack)"]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
53 pub fn do_not_track(this: &Navigator) -> ::alloc::string::String;
54 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = maxTouchPoints)]
55 #[doc = "Getter for the `maxTouchPoints` field of this object."]
56 #[doc = ""]
57 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/maxTouchPoints)"]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
60 pub fn max_touch_points(this: &Navigator) -> i32;
61 #[cfg(feature = "MediaCapabilities")]
62 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = mediaCapabilities)]
63 #[doc = "Getter for the `mediaCapabilities` field of this object."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mediaCapabilities)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `MediaCapabilities`, `Navigator`*"]
68 pub fn media_capabilities(this: &Navigator) -> MediaCapabilities;
69 #[cfg(feature = "NetworkInformation")]
70 # [wasm_bindgen (structural , catch , method , getter , js_class = "Navigator" , js_name = connection)]
71 #[doc = "Getter for the `connection` field of this object."]
72 #[doc = ""]
73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection)"]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `NetworkInformation`*"]
76 pub fn connection(this: &Navigator) -> Result<NetworkInformation, JsValue>;
77 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = activeVRDisplays)]
78 #[doc = "Getter for the `activeVRDisplays` field of this object."]
79 #[doc = ""]
80 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/activeVRDisplays)"]
81 #[doc = ""]
82 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
83 pub fn active_vr_displays(this: &Navigator) -> ::js_sys::Array;
84 #[cfg(feature = "MediaDevices")]
85 # [wasm_bindgen (structural , catch , method , getter , js_class = "Navigator" , js_name = mediaDevices)]
86 #[doc = "Getter for the `mediaDevices` field of this object."]
87 #[doc = ""]
88 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mediaDevices)"]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `MediaDevices`, `Navigator`*"]
91 pub fn media_devices(this: &Navigator) -> Result<MediaDevices, JsValue>;
92 #[cfg(feature = "ServiceWorkerContainer")]
93 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = serviceWorker)]
94 #[doc = "Getter for the `serviceWorker` field of this object."]
95 #[doc = ""]
96 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/serviceWorker)"]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `ServiceWorkerContainer`*"]
99 pub fn service_worker(this: &Navigator) -> ServiceWorkerContainer;
100 #[cfg(feature = "Presentation")]
101 # [wasm_bindgen (structural , catch , method , getter , js_class = "Navigator" , js_name = presentation)]
102 #[doc = "Getter for the `presentation` field of this object."]
103 #[doc = ""]
104 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/presentation)"]
105 #[doc = ""]
106 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `Presentation`*"]
107 pub fn presentation(this: &Navigator) -> Result<Option<Presentation>, JsValue>;
108 #[cfg(feature = "CredentialsContainer")]
109 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = credentials)]
110 #[doc = "Getter for the `credentials` field of this object."]
111 #[doc = ""]
112 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/credentials)"]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `CredentialsContainer`, `Navigator`*"]
115 pub fn credentials(this: &Navigator) -> CredentialsContainer;
116 #[cfg(feature = "UserActivation")]
117 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = userActivation)]
118 #[doc = "Getter for the `userActivation` field of this object."]
119 #[doc = ""]
120 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userActivation)"]
121 #[doc = ""]
122 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `UserActivation`*"]
123 pub fn user_activation(this: &Navigator) -> UserActivation;
124 #[cfg(web_sys_unstable_apis)]
125 #[cfg(feature = "Bluetooth")]
126 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = bluetooth)]
127 #[doc = "Getter for the `bluetooth` field of this object."]
128 #[doc = ""]
129 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/bluetooth)"]
130 #[doc = ""]
131 #[doc = "*This API requires the following crate features to be activated: `Bluetooth`, `Navigator`*"]
132 #[doc = ""]
133 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
134 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
135 pub fn bluetooth(this: &Navigator) -> Option<Bluetooth>;
136 #[cfg(web_sys_unstable_apis)]
137 #[cfg(feature = "MediaSession")]
138 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = mediaSession)]
139 #[doc = "Getter for the `mediaSession` field of this object."]
140 #[doc = ""]
141 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mediaSession)"]
142 #[doc = ""]
143 #[doc = "*This API requires the following crate features to be activated: `MediaSession`, `Navigator`*"]
144 #[doc = ""]
145 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
146 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
147 pub fn media_session(this: &Navigator) -> MediaSession;
148 #[cfg(web_sys_unstable_apis)]
149 #[cfg(feature = "WakeLock")]
150 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = wakeLock)]
151 #[doc = "Getter for the `wakeLock` field of this object."]
152 #[doc = ""]
153 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/wakeLock)"]
154 #[doc = ""]
155 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `WakeLock`*"]
156 #[doc = ""]
157 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
158 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
159 pub fn wake_lock(this: &Navigator) -> WakeLock;
160 #[cfg(web_sys_unstable_apis)]
161 #[cfg(feature = "Hid")]
162 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = hid)]
163 #[doc = "Getter for the `hid` field of this object."]
164 #[doc = ""]
165 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/hid)"]
166 #[doc = ""]
167 #[doc = "*This API requires the following crate features to be activated: `Hid`, `Navigator`*"]
168 #[doc = ""]
169 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
170 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
171 pub fn hid(this: &Navigator) -> Hid;
172 #[cfg(web_sys_unstable_apis)]
173 #[cfg(feature = "Serial")]
174 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = serial)]
175 #[doc = "Getter for the `serial` field of this object."]
176 #[doc = ""]
177 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/serial)"]
178 #[doc = ""]
179 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `Serial`*"]
180 #[doc = ""]
181 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
182 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
183 pub fn serial(this: &Navigator) -> Serial;
184 #[cfg(web_sys_unstable_apis)]
185 #[cfg(feature = "Usb")]
186 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = usb)]
187 #[doc = "Getter for the `usb` field of this object."]
188 #[doc = ""]
189 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/usb)"]
190 #[doc = ""]
191 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `Usb`*"]
192 #[doc = ""]
193 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
194 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
195 pub fn usb(this: &Navigator) -> Usb;
196 #[cfg(web_sys_unstable_apis)]
197 #[cfg(feature = "XrSystem")]
198 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = xr)]
199 #[doc = "Getter for the `xr` field of this object."]
200 #[doc = ""]
201 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/xr)"]
202 #[doc = ""]
203 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `XrSystem`*"]
204 #[doc = ""]
205 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
206 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
207 pub fn xr(this: &Navigator) -> XrSystem;
208 #[cfg(web_sys_unstable_apis)]
209 #[cfg(feature = "Scheduling")]
210 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = scheduling)]
211 #[doc = "Getter for the `scheduling` field of this object."]
212 #[doc = ""]
213 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/scheduling)"]
214 #[doc = ""]
215 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `Scheduling`*"]
216 #[doc = ""]
217 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
218 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
219 pub fn scheduling(this: &Navigator) -> Scheduling;
220 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = hardwareConcurrency)]
221 #[doc = "Getter for the `hardwareConcurrency` field of this object."]
222 #[doc = ""]
223 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/hardwareConcurrency)"]
224 #[doc = ""]
225 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
226 pub fn hardware_concurrency(this: &Navigator) -> f64;
227 #[cfg(web_sys_unstable_apis)]
228 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = deviceMemory)]
229 #[doc = "Getter for the `deviceMemory` field of this object."]
230 #[doc = ""]
231 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/deviceMemory)"]
232 #[doc = ""]
233 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
234 #[doc = ""]
235 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
236 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
237 pub fn device_memory(this: &Navigator) -> f64;
238 #[cfg(web_sys_unstable_apis)]
239 #[cfg(feature = "Gpu")]
240 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = gpu)]
241 #[doc = "Getter for the `gpu` field of this object."]
242 #[doc = ""]
243 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/gpu)"]
244 #[doc = ""]
245 #[doc = "*This API requires the following crate features to be activated: `Gpu`, `Navigator`*"]
246 #[doc = ""]
247 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
248 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
249 pub fn gpu(this: &Navigator) -> Gpu;
250 #[cfg(feature = "Geolocation")]
251 # [wasm_bindgen (structural , catch , method , getter , js_class = "Navigator" , js_name = geolocation)]
252 #[doc = "Getter for the `geolocation` field of this object."]
253 #[doc = ""]
254 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/geolocation)"]
255 #[doc = ""]
256 #[doc = "*This API requires the following crate features to be activated: `Geolocation`, `Navigator`*"]
257 pub fn geolocation(this: &Navigator) -> Result<Geolocation, JsValue>;
258 # [wasm_bindgen (structural , catch , method , getter , js_class = "Navigator" , js_name = appCodeName)]
259 #[doc = "Getter for the `appCodeName` field of this object."]
260 #[doc = ""]
261 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appCodeName)"]
262 #[doc = ""]
263 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
264 pub fn app_code_name(this: &Navigator) -> Result<::alloc::string::String, JsValue>;
265 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = appName)]
266 #[doc = "Getter for the `appName` field of this object."]
267 #[doc = ""]
268 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appName)"]
269 #[doc = ""]
270 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
271 pub fn app_name(this: &Navigator) -> ::alloc::string::String;
272 # [wasm_bindgen (structural , catch , method , getter , js_class = "Navigator" , js_name = appVersion)]
273 #[doc = "Getter for the `appVersion` field of this object."]
274 #[doc = ""]
275 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/appVersion)"]
276 #[doc = ""]
277 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
278 pub fn app_version(this: &Navigator) -> Result<::alloc::string::String, JsValue>;
279 # [wasm_bindgen (structural , catch , method , getter , js_class = "Navigator" , js_name = platform)]
280 #[doc = "Getter for the `platform` field of this object."]
281 #[doc = ""]
282 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/platform)"]
283 #[doc = ""]
284 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
285 pub fn platform(this: &Navigator) -> Result<::alloc::string::String, JsValue>;
286 # [wasm_bindgen (structural , catch , method , getter , js_class = "Navigator" , js_name = userAgent)]
287 #[doc = "Getter for the `userAgent` field of this object."]
288 #[doc = ""]
289 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent)"]
290 #[doc = ""]
291 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
292 pub fn user_agent(this: &Navigator) -> Result<::alloc::string::String, JsValue>;
293 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = product)]
294 #[doc = "Getter for the `product` field of this object."]
295 #[doc = ""]
296 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/product)"]
297 #[doc = ""]
298 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
299 pub fn product(this: &Navigator) -> ::alloc::string::String;
300 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = language)]
301 #[doc = "Getter for the `language` field of this object."]
302 #[doc = ""]
303 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/language)"]
304 #[doc = ""]
305 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
306 pub fn language(this: &Navigator) -> Option<::alloc::string::String>;
307 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = languages)]
308 #[doc = "Getter for the `languages` field of this object."]
309 #[doc = ""]
310 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages)"]
311 #[doc = ""]
312 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
313 pub fn languages(this: &Navigator) -> ::js_sys::Array;
314 #[cfg(web_sys_unstable_apis)]
315 #[cfg(feature = "LockManager")]
316 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = locks)]
317 #[doc = "Getter for the `locks` field of this object."]
318 #[doc = ""]
319 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/locks)"]
320 #[doc = ""]
321 #[doc = "*This API requires the following crate features to be activated: `LockManager`, `Navigator`*"]
322 #[doc = ""]
323 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
324 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
325 pub fn locks(this: &Navigator) -> LockManager;
326 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = onLine)]
327 #[doc = "Getter for the `onLine` field of this object."]
328 #[doc = ""]
329 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/onLine)"]
330 #[doc = ""]
331 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
332 pub fn on_line(this: &Navigator) -> bool;
333 #[cfg(feature = "StorageManager")]
334 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = storage)]
335 #[doc = "Getter for the `storage` field of this object."]
336 #[doc = ""]
337 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/storage)"]
338 #[doc = ""]
339 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `StorageManager`*"]
340 pub fn storage(this: &Navigator) -> StorageManager;
341 #[cfg(web_sys_unstable_apis)]
342 #[cfg(feature = "NavigatorUaData")]
343 # [wasm_bindgen (structural , method , getter , js_class = "Navigator" , js_name = userAgentData)]
344 #[doc = "Getter for the `userAgentData` field of this object."]
345 #[doc = ""]
346 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgentData)"]
347 #[doc = ""]
348 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `NavigatorUaData`*"]
349 #[doc = ""]
350 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
351 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
352 pub fn user_agent_data(this: &Navigator) -> NavigatorUaData;
353 # [wasm_bindgen (method , structural , js_class = "Navigator" , js_name = canShare)]
354 #[doc = "The `canShare()` method."]
355 #[doc = ""]
356 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/canShare)"]
357 #[doc = ""]
358 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
359 pub fn can_share(this: &Navigator) -> bool;
360 #[cfg(feature = "ShareData")]
361 # [wasm_bindgen (method , structural , js_class = "Navigator" , js_name = canShare)]
362 #[doc = "The `canShare()` method."]
363 #[doc = ""]
364 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/canShare)"]
365 #[doc = ""]
366 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `ShareData`*"]
367 pub fn can_share_with_data(this: &Navigator, data: &ShareData) -> bool;
368 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = getGamepads)]
369 #[doc = "The `getGamepads()` method."]
370 #[doc = ""]
371 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getGamepads)"]
372 #[doc = ""]
373 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
374 pub fn get_gamepads(this: &Navigator) -> Result<::js_sys::Array, JsValue>;
375 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = getVRDisplays)]
376 #[doc = "The `getVRDisplays()` method."]
377 #[doc = ""]
378 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getVRDisplays)"]
379 #[doc = ""]
380 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
381 pub fn get_vr_displays(this: &Navigator) -> Result<::js_sys::Promise, JsValue>;
382 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = requestMIDIAccess)]
383 #[doc = "The `requestMIDIAccess()` method."]
384 #[doc = ""]
385 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/requestMIDIAccess)"]
386 #[doc = ""]
387 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
388 pub fn request_midi_access(this: &Navigator) -> Result<::js_sys::Promise, JsValue>;
389 #[cfg(feature = "MidiOptions")]
390 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = requestMIDIAccess)]
391 #[doc = "The `requestMIDIAccess()` method."]
392 #[doc = ""]
393 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/requestMIDIAccess)"]
394 #[doc = ""]
395 #[doc = "*This API requires the following crate features to be activated: `MidiOptions`, `Navigator`*"]
396 pub fn request_midi_access_with_options(
397 this: &Navigator,
398 options: &MidiOptions,
399 ) -> Result<::js_sys::Promise, JsValue>;
400 # [wasm_bindgen (method , structural , js_class = "Navigator" , js_name = requestMediaKeySystemAccess)]
401 #[doc = "The `requestMediaKeySystemAccess()` method."]
402 #[doc = ""]
403 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/requestMediaKeySystemAccess)"]
404 #[doc = ""]
405 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
406 pub fn request_media_key_system_access(
407 this: &Navigator,
408 key_system: &str,
409 supported_configurations: &::wasm_bindgen::JsValue,
410 ) -> ::js_sys::Promise;
411 #[cfg(feature = "VrServiceTest")]
412 # [wasm_bindgen (method , structural , js_class = "Navigator" , js_name = requestVRServiceTest)]
413 #[doc = "The `requestVRServiceTest()` method."]
414 #[doc = ""]
415 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/requestVRServiceTest)"]
416 #[doc = ""]
417 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `VrServiceTest`*"]
418 pub fn request_vr_service_test(this: &Navigator) -> VrServiceTest;
419 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = sendBeacon)]
420 #[doc = "The `sendBeacon()` method."]
421 #[doc = ""]
422 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)"]
423 #[doc = ""]
424 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
425 pub fn send_beacon(this: &Navigator, url: &str) -> Result<bool, JsValue>;
426 #[cfg(feature = "Blob")]
427 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = sendBeacon)]
428 #[doc = "The `sendBeacon()` method."]
429 #[doc = ""]
430 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)"]
431 #[doc = ""]
432 #[doc = "*This API requires the following crate features to be activated: `Blob`, `Navigator`*"]
433 pub fn send_beacon_with_opt_blob(
434 this: &Navigator,
435 url: &str,
436 data: Option<&Blob>,
437 ) -> Result<bool, JsValue>;
438 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = sendBeacon)]
439 #[doc = "The `sendBeacon()` method."]
440 #[doc = ""]
441 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)"]
442 #[doc = ""]
443 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
444 pub fn send_beacon_with_opt_buffer_source(
445 this: &Navigator,
446 url: &str,
447 data: Option<&::js_sys::Object>,
448 ) -> Result<bool, JsValue>;
449 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = sendBeacon)]
450 #[doc = "The `sendBeacon()` method."]
451 #[doc = ""]
452 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)"]
453 #[doc = ""]
454 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
455 pub fn send_beacon_with_opt_u8_array(
456 this: &Navigator,
457 url: &str,
458 data: Option<&mut [u8]>,
459 ) -> Result<bool, JsValue>;
460 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = sendBeacon)]
461 #[doc = "The `sendBeacon()` method."]
462 #[doc = ""]
463 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)"]
464 #[doc = ""]
465 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
466 pub fn send_beacon_with_opt_js_u8_array(
467 this: &Navigator,
468 url: &str,
469 data: Option<&::js_sys::Uint8Array>,
470 ) -> Result<bool, JsValue>;
471 #[cfg(feature = "FormData")]
472 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = sendBeacon)]
473 #[doc = "The `sendBeacon()` method."]
474 #[doc = ""]
475 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)"]
476 #[doc = ""]
477 #[doc = "*This API requires the following crate features to be activated: `FormData`, `Navigator`*"]
478 pub fn send_beacon_with_opt_form_data(
479 this: &Navigator,
480 url: &str,
481 data: Option<&FormData>,
482 ) -> Result<bool, JsValue>;
483 #[cfg(feature = "UrlSearchParams")]
484 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = sendBeacon)]
485 #[doc = "The `sendBeacon()` method."]
486 #[doc = ""]
487 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)"]
488 #[doc = ""]
489 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `UrlSearchParams`*"]
490 pub fn send_beacon_with_opt_url_search_params(
491 this: &Navigator,
492 url: &str,
493 data: Option<&UrlSearchParams>,
494 ) -> Result<bool, JsValue>;
495 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = sendBeacon)]
496 #[doc = "The `sendBeacon()` method."]
497 #[doc = ""]
498 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)"]
499 #[doc = ""]
500 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
501 pub fn send_beacon_with_opt_str(
502 this: &Navigator,
503 url: &str,
504 data: Option<&str>,
505 ) -> Result<bool, JsValue>;
506 #[cfg(feature = "ReadableStream")]
507 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = sendBeacon)]
508 #[doc = "The `sendBeacon()` method."]
509 #[doc = ""]
510 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon)"]
511 #[doc = ""]
512 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `ReadableStream`*"]
513 pub fn send_beacon_with_opt_readable_stream(
514 this: &Navigator,
515 url: &str,
516 data: Option<&ReadableStream>,
517 ) -> Result<bool, JsValue>;
518 # [wasm_bindgen (method , structural , js_class = "Navigator" , js_name = share)]
519 #[doc = "The `share()` method."]
520 #[doc = ""]
521 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share)"]
522 #[doc = ""]
523 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
524 pub fn share(this: &Navigator) -> ::js_sys::Promise;
525 #[cfg(feature = "ShareData")]
526 # [wasm_bindgen (method , structural , js_class = "Navigator" , js_name = share)]
527 #[doc = "The `share()` method."]
528 #[doc = ""]
529 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share)"]
530 #[doc = ""]
531 #[doc = "*This API requires the following crate features to be activated: `Navigator`, `ShareData`*"]
532 pub fn share_with_data(this: &Navigator, data: &ShareData) -> ::js_sys::Promise;
533 # [wasm_bindgen (method , structural , js_class = "Navigator" , js_name = vibrate)]
534 #[doc = "The `vibrate()` method."]
535 #[doc = ""]
536 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate)"]
537 #[doc = ""]
538 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
539 pub fn vibrate_with_duration(this: &Navigator, pattern: u32) -> bool;
540 # [wasm_bindgen (method , structural , js_class = "Navigator" , js_name = vibrate)]
541 #[doc = "The `vibrate()` method."]
542 #[doc = ""]
543 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/vibrate)"]
544 #[doc = ""]
545 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
546 pub fn vibrate_with_pattern(this: &Navigator, pattern: &::wasm_bindgen::JsValue) -> bool;
547 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = registerContentHandler)]
548 #[doc = "The `registerContentHandler()` method."]
549 #[doc = ""]
550 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerContentHandler)"]
551 #[doc = ""]
552 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
553 pub fn register_content_handler(
554 this: &Navigator,
555 mime_type: &str,
556 url: &str,
557 title: &str,
558 ) -> Result<(), JsValue>;
559 # [wasm_bindgen (catch , method , structural , js_class = "Navigator" , js_name = registerProtocolHandler)]
560 #[doc = "The `registerProtocolHandler()` method."]
561 #[doc = ""]
562 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/registerProtocolHandler)"]
563 #[doc = ""]
564 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
565 pub fn register_protocol_handler(
566 this: &Navigator,
567 scheme: &str,
568 url: &str,
569 title: &str,
570 ) -> Result<(), JsValue>;
571 # [wasm_bindgen (method , structural , js_class = "Navigator" , js_name = taintEnabled)]
572 #[doc = "The `taintEnabled()` method."]
573 #[doc = ""]
574 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/taintEnabled)"]
575 #[doc = ""]
576 #[doc = "*This API requires the following crate features to be activated: `Navigator`*"]
577 pub fn taint_enabled(this: &Navigator) -> bool;
578}