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