910e62b5创建于 1月15日历史提交
// 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 {
    [Measure] readonly attribute boolean charging;
    [Measure] readonly attribute unrestricted double chargingTime;
    [Measure] readonly attribute unrestricted double dischargingTime;
    [Measure] readonly attribute double level;

    attribute EventHandler onchargingchange;
    attribute EventHandler onchargingtimechange;
    attribute EventHandler ondischargingtimechange;
    attribute EventHandler onlevelchange;
};