BatteryManager

Tags: 1.0 2.0 2.5 Web

Description

The BatteryManager interface provides ways to get information about the system's battery charge level.

The navigator.getBattery() method returns a battery promise that is resolved in a BatteryManager interface which you can use to interact with the Battery Status API.

Properties

Event Handlers

Methods

Inherited from EventTarget:

Additional methods for Mozilla chrome code

  • void setEventHandler(DOMString type, EventHandler handler)
  • EventHandler getEventHandler(DOMString type)

Mozilla extensions for use by JS-implemented event targets to implement on* properties. See also WebIDL bindings.

Example