A JavaScript implementation of the Battery Status Events draft (W3C Working Draft 15 September 2011).
This demo implements the Battery Status Events specification and simulates battery-powered user agent behavior. You can adjust the battery level and whether the device is plugged in from the controls below. A blink of an event name indicates the event has been fired.