web_sys/features/
gen_BatteryManager.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = BatteryManager , typescript_type = "BatteryManager")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `BatteryManager` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
14    pub type BatteryManager;
15    # [wasm_bindgen (structural , method , getter , js_class = "BatteryManager" , js_name = charging)]
16    #[doc = "Getter for the `charging` field of this object."]
17    #[doc = ""]
18    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/charging)"]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
21    pub fn charging(this: &BatteryManager) -> bool;
22    # [wasm_bindgen (structural , method , getter , js_class = "BatteryManager" , js_name = chargingTime)]
23    #[doc = "Getter for the `chargingTime` field of this object."]
24    #[doc = ""]
25    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/chargingTime)"]
26    #[doc = ""]
27    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
28    pub fn charging_time(this: &BatteryManager) -> f64;
29    # [wasm_bindgen (structural , method , getter , js_class = "BatteryManager" , js_name = dischargingTime)]
30    #[doc = "Getter for the `dischargingTime` field of this object."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/dischargingTime)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
35    pub fn discharging_time(this: &BatteryManager) -> f64;
36    # [wasm_bindgen (structural , method , getter , js_class = "BatteryManager" , js_name = level)]
37    #[doc = "Getter for the `level` field of this object."]
38    #[doc = ""]
39    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/level)"]
40    #[doc = ""]
41    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
42    pub fn level(this: &BatteryManager) -> f64;
43    # [wasm_bindgen (structural , method , getter , js_class = "BatteryManager" , js_name = onchargingchange)]
44    #[doc = "Getter for the `onchargingchange` field of this object."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingchange)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
49    pub fn onchargingchange(this: &BatteryManager) -> Option<::js_sys::Function>;
50    # [wasm_bindgen (structural , method , setter , js_class = "BatteryManager" , js_name = onchargingchange)]
51    #[doc = "Setter for the `onchargingchange` field of this object."]
52    #[doc = ""]
53    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingchange)"]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
56    pub fn set_onchargingchange(this: &BatteryManager, value: Option<&::js_sys::Function>);
57    # [wasm_bindgen (structural , method , getter , js_class = "BatteryManager" , js_name = onchargingtimechange)]
58    #[doc = "Getter for the `onchargingtimechange` field of this object."]
59    #[doc = ""]
60    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingtimechange)"]
61    #[doc = ""]
62    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
63    pub fn onchargingtimechange(this: &BatteryManager) -> Option<::js_sys::Function>;
64    # [wasm_bindgen (structural , method , setter , js_class = "BatteryManager" , js_name = onchargingtimechange)]
65    #[doc = "Setter for the `onchargingtimechange` field of this object."]
66    #[doc = ""]
67    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onchargingtimechange)"]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
70    pub fn set_onchargingtimechange(this: &BatteryManager, value: Option<&::js_sys::Function>);
71    # [wasm_bindgen (structural , method , getter , js_class = "BatteryManager" , js_name = ondischargingtimechange)]
72    #[doc = "Getter for the `ondischargingtimechange` field of this object."]
73    #[doc = ""]
74    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/ondischargingtimechange)"]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
77    pub fn ondischargingtimechange(this: &BatteryManager) -> Option<::js_sys::Function>;
78    # [wasm_bindgen (structural , method , setter , js_class = "BatteryManager" , js_name = ondischargingtimechange)]
79    #[doc = "Setter for the `ondischargingtimechange` field of this object."]
80    #[doc = ""]
81    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/ondischargingtimechange)"]
82    #[doc = ""]
83    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
84    pub fn set_ondischargingtimechange(this: &BatteryManager, value: Option<&::js_sys::Function>);
85    # [wasm_bindgen (structural , method , getter , js_class = "BatteryManager" , js_name = onlevelchange)]
86    #[doc = "Getter for the `onlevelchange` field of this object."]
87    #[doc = ""]
88    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onlevelchange)"]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
91    pub fn onlevelchange(this: &BatteryManager) -> Option<::js_sys::Function>;
92    # [wasm_bindgen (structural , method , setter , js_class = "BatteryManager" , js_name = onlevelchange)]
93    #[doc = "Setter for the `onlevelchange` field of this object."]
94    #[doc = ""]
95    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/BatteryManager/onlevelchange)"]
96    #[doc = ""]
97    #[doc = "*This API requires the following crate features to be activated: `BatteryManager`*"]
98    pub fn set_onlevelchange(this: &BatteryManager, value: Option<&::js_sys::Function>);
99}