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 = WorkerNavigator , typescript_type = "WorkerNavigator")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `WorkerNavigator` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
14 pub type WorkerNavigator;
15 #[cfg(feature = "NetworkInformation")]
16 # [wasm_bindgen (structural , catch , method , getter , js_class = "WorkerNavigator" , js_name = connection)]
17 #[doc = "Getter for the `connection` field of this object."]
18 #[doc = ""]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/connection)"]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `NetworkInformation`, `WorkerNavigator`*"]
22 pub fn connection(this: &WorkerNavigator) -> Result<NetworkInformation, JsValue>;
23 #[cfg(feature = "MediaCapabilities")]
24 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = mediaCapabilities)]
25 #[doc = "Getter for the `mediaCapabilities` field of this object."]
26 #[doc = ""]
27 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/mediaCapabilities)"]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `MediaCapabilities`, `WorkerNavigator`*"]
30 pub fn media_capabilities(this: &WorkerNavigator) -> MediaCapabilities;
31 #[cfg(web_sys_unstable_apis)]
32 #[cfg(feature = "Serial")]
33 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = serial)]
34 #[doc = "Getter for the `serial` field of this object."]
35 #[doc = ""]
36 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/serial)"]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `Serial`, `WorkerNavigator`*"]
39 #[doc = ""]
40 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
42 pub fn serial(this: &WorkerNavigator) -> Serial;
43 #[cfg(web_sys_unstable_apis)]
44 #[cfg(feature = "Usb")]
45 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = usb)]
46 #[doc = "Getter for the `usb` field of this object."]
47 #[doc = ""]
48 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/usb)"]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `Usb`, `WorkerNavigator`*"]
51 #[doc = ""]
52 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
53 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
54 pub fn usb(this: &WorkerNavigator) -> Usb;
55 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = hardwareConcurrency)]
56 #[doc = "Getter for the `hardwareConcurrency` field of this object."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/hardwareConcurrency)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
61 pub fn hardware_concurrency(this: &WorkerNavigator) -> f64;
62 #[cfg(web_sys_unstable_apis)]
63 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = deviceMemory)]
64 #[doc = "Getter for the `deviceMemory` field of this object."]
65 #[doc = ""]
66 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/deviceMemory)"]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
69 #[doc = ""]
70 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
72 pub fn device_memory(this: &WorkerNavigator) -> f64;
73 #[cfg(web_sys_unstable_apis)]
74 #[cfg(feature = "Gpu")]
75 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = gpu)]
76 #[doc = "Getter for the `gpu` field of this object."]
77 #[doc = ""]
78 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/gpu)"]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `Gpu`, `WorkerNavigator`*"]
81 #[doc = ""]
82 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
83 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
84 pub fn gpu(this: &WorkerNavigator) -> Gpu;
85 # [wasm_bindgen (structural , catch , method , getter , js_class = "WorkerNavigator" , js_name = appCodeName)]
86 #[doc = "Getter for the `appCodeName` field of this object."]
87 #[doc = ""]
88 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/appCodeName)"]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
91 pub fn app_code_name(this: &WorkerNavigator) -> Result<::alloc::string::String, JsValue>;
92 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = appName)]
93 #[doc = "Getter for the `appName` field of this object."]
94 #[doc = ""]
95 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/appName)"]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
98 pub fn app_name(this: &WorkerNavigator) -> ::alloc::string::String;
99 # [wasm_bindgen (structural , catch , method , getter , js_class = "WorkerNavigator" , js_name = appVersion)]
100 #[doc = "Getter for the `appVersion` field of this object."]
101 #[doc = ""]
102 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/appVersion)"]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
105 pub fn app_version(this: &WorkerNavigator) -> Result<::alloc::string::String, JsValue>;
106 # [wasm_bindgen (structural , catch , method , getter , js_class = "WorkerNavigator" , js_name = platform)]
107 #[doc = "Getter for the `platform` field of this object."]
108 #[doc = ""]
109 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/platform)"]
110 #[doc = ""]
111 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
112 pub fn platform(this: &WorkerNavigator) -> Result<::alloc::string::String, JsValue>;
113 # [wasm_bindgen (structural , catch , method , getter , js_class = "WorkerNavigator" , js_name = userAgent)]
114 #[doc = "Getter for the `userAgent` field of this object."]
115 #[doc = ""]
116 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/userAgent)"]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
119 pub fn user_agent(this: &WorkerNavigator) -> Result<::alloc::string::String, JsValue>;
120 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = product)]
121 #[doc = "Getter for the `product` field of this object."]
122 #[doc = ""]
123 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/product)"]
124 #[doc = ""]
125 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
126 pub fn product(this: &WorkerNavigator) -> ::alloc::string::String;
127 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = language)]
128 #[doc = "Getter for the `language` field of this object."]
129 #[doc = ""]
130 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/language)"]
131 #[doc = ""]
132 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
133 pub fn language(this: &WorkerNavigator) -> Option<::alloc::string::String>;
134 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = languages)]
135 #[doc = "Getter for the `languages` field of this object."]
136 #[doc = ""]
137 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/languages)"]
138 #[doc = ""]
139 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
140 pub fn languages(this: &WorkerNavigator) -> ::js_sys::Array;
141 #[cfg(web_sys_unstable_apis)]
142 #[cfg(feature = "LockManager")]
143 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = locks)]
144 #[doc = "Getter for the `locks` field of this object."]
145 #[doc = ""]
146 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/locks)"]
147 #[doc = ""]
148 #[doc = "*This API requires the following crate features to be activated: `LockManager`, `WorkerNavigator`*"]
149 #[doc = ""]
150 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
151 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
152 pub fn locks(this: &WorkerNavigator) -> LockManager;
153 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = onLine)]
154 #[doc = "Getter for the `onLine` field of this object."]
155 #[doc = ""]
156 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/onLine)"]
157 #[doc = ""]
158 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
159 pub fn on_line(this: &WorkerNavigator) -> bool;
160 #[cfg(feature = "StorageManager")]
161 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = storage)]
162 #[doc = "Getter for the `storage` field of this object."]
163 #[doc = ""]
164 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/storage)"]
165 #[doc = ""]
166 #[doc = "*This API requires the following crate features to be activated: `StorageManager`, `WorkerNavigator`*"]
167 pub fn storage(this: &WorkerNavigator) -> StorageManager;
168 #[cfg(web_sys_unstable_apis)]
169 #[cfg(feature = "NavigatorUaData")]
170 # [wasm_bindgen (structural , method , getter , js_class = "WorkerNavigator" , js_name = userAgentData)]
171 #[doc = "Getter for the `userAgentData` field of this object."]
172 #[doc = ""]
173 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/userAgentData)"]
174 #[doc = ""]
175 #[doc = "*This API requires the following crate features to be activated: `NavigatorUaData`, `WorkerNavigator`*"]
176 #[doc = ""]
177 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
178 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
179 pub fn user_agent_data(this: &WorkerNavigator) -> NavigatorUaData;
180 # [wasm_bindgen (method , structural , js_class = "WorkerNavigator" , js_name = taintEnabled)]
181 #[doc = "The `taintEnabled()` method."]
182 #[doc = ""]
183 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WorkerNavigator/taintEnabled)"]
184 #[doc = ""]
185 #[doc = "*This API requires the following crate features to be activated: `WorkerNavigator`*"]
186 pub fn taint_enabled(this: &WorkerNavigator) -> bool;
187}