// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// https://w3c.github.io/battery/#the-batterymanager-interface
[
ActiveScriptWrappable,
SecureContext,
Exposed=Window
] interface BatteryManager : EventTarget {
[HighEntropy=Direct, Measure] readonly attribute boolean charging;
[HighEntropy, Measure] readonly attribute unrestricted double chargingTime;
[HighEntropy, Measure] readonly attribute unrestricted double dischargingTime;
[HighEntropy, Measure] readonly attribute double level;
attribute EventHandler onchargingchange;
attribute EventHandler onchargingtimechange;
attribute EventHandler ondischargingtimechange;
attribute EventHandler onlevelchange;
};