web_sys/features/
gen_WakeLock.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 #[wasm_bindgen(
9 extends = "::js_sys::Object",
10 js_name = "WakeLock",
11 typescript_type = "WakeLock"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `WakeLock` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WakeLock)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `WakeLock`*"]
19 #[doc = ""]
20 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22 pub type WakeLock;
23 #[cfg(web_sys_unstable_apis)]
24 #[cfg(all(feature = "WakeLockSentinel", feature = "WakeLockType",))]
25 #[wasm_bindgen(method, js_class = "WakeLock")]
26 #[doc = "The `request()` method."]
27 #[doc = ""]
28 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WakeLock/request)"]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `WakeLock`, `WakeLockSentinel`, `WakeLockType`*"]
31 #[doc = ""]
32 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
33 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
34 pub fn request(this: &WakeLock, type_: WakeLockType) -> ::js_sys::Promise<WakeLockSentinel>;
35}