battery-status.idl (888B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: Battery Status API (https://w3c.github.io/battery/) 5 6 [SecureContext] 7 partial interface Navigator { 8 Promise<BatteryManager> getBattery(); 9 }; 10 11 [SecureContext, Exposed=Window] 12 interface BatteryManager : EventTarget { 13 readonly attribute boolean charging; 14 readonly attribute unrestricted double chargingTime; 15 readonly attribute unrestricted double dischargingTime; 16 readonly attribute double level; 17 attribute EventHandler onchargingchange; 18 attribute EventHandler onchargingtimechange; 19 attribute EventHandler ondischargingtimechange; 20 attribute EventHandler onlevelchange; 21 };