web_sys/features/
gen_WakeLockSentinel.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 = "EventTarget",
10 extends = "::js_sys::Object",
11 js_name = "WakeLockSentinel",
12 typescript_type = "WakeLockSentinel"
13 )]
14 #[derive(Debug, Clone, PartialEq, Eq)]
15 #[doc = "The `WakeLockSentinel` class."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WakeLockSentinel)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `WakeLockSentinel`*"]
20 #[doc = ""]
21 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
22 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
23 pub type WakeLockSentinel;
24 #[cfg(web_sys_unstable_apis)]
25 #[wasm_bindgen(method, getter, js_class = "WakeLockSentinel", js_name = "released")]
26 #[doc = "Getter for the `released` field of this object."]
27 #[doc = ""]
28 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WakeLockSentinel/released)"]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `WakeLockSentinel`*"]
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 released(this: &WakeLockSentinel) -> bool;
35 #[cfg(web_sys_unstable_apis)]
36 #[cfg(feature = "WakeLockType")]
37 #[wasm_bindgen(method, getter, js_class = "WakeLockSentinel", js_name = "type")]
38 #[doc = "Getter for the `type` field of this object."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WakeLockSentinel/type)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `WakeLockSentinel`, `WakeLockType`*"]
43 #[doc = ""]
44 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
45 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
46 pub fn type_(this: &WakeLockSentinel) -> WakeLockType;
47 #[cfg(web_sys_unstable_apis)]
48 #[wasm_bindgen(method, getter, js_class = "WakeLockSentinel", js_name = "onrelease")]
49 #[doc = "Getter for the `onrelease` field of this object."]
50 #[doc = ""]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WakeLockSentinel/onrelease)"]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `WakeLockSentinel`*"]
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 onrelease(this: &WakeLockSentinel) -> Option<::js_sys::Function>;
58 #[cfg(web_sys_unstable_apis)]
59 #[wasm_bindgen(method, setter, js_class = "WakeLockSentinel", js_name = "onrelease")]
60 #[doc = "Setter for the `onrelease` field of this object."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WakeLockSentinel/onrelease)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `WakeLockSentinel`*"]
65 #[doc = ""]
66 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
67 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
68 pub fn set_onrelease(this: &WakeLockSentinel, value: Option<&::js_sys::Function>);
69 #[cfg(web_sys_unstable_apis)]
70 #[wasm_bindgen(method, js_class = "WakeLockSentinel")]
71 #[doc = "The `release()` method."]
72 #[doc = ""]
73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/WakeLockSentinel/release)"]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `WakeLockSentinel`*"]
76 #[doc = ""]
77 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
78 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
79 pub fn release(this: &WakeLockSentinel) -> ::js_sys::Promise<::js_sys::Undefined>;
80}