1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// https://w3c.github.io/battery/#the-batterymanager-interface
6[
7    ActiveScriptWrappable,
8    Exposed=Window
9] interface BatteryManager : EventTarget {
10    [HighEntropy=Direct, Measure] readonly attribute boolean charging;
11    [HighEntropy, Measure] readonly attribute unrestricted double chargingTime;
12    [HighEntropy, Measure] readonly attribute unrestricted double dischargingTime;
13    [HighEntropy, Measure] readonly attribute double level;
14
15    attribute EventHandler onchargingchange;
16    attribute EventHandler onchargingtimechange;
17    attribute EventHandler ondischargingtimechange;
18    attribute EventHandler onlevelchange;
19};
20