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