blob: aed13fb80990f50c393e8c1901771a5f3b8980dd [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// 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,
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;
};