W3C home > Mailing lists > Public > public-device-apis@w3.org > September 2011

RE: Battery Status Events Playground

From: Josh Soref <jsoref@rim.com>
Date: Thu, 8 Sep 2011 13:12:51 -0400
To: Anssi Kostiainen <anssi.kostiainen@nokia.com>, "public-device-apis@w3.org WG" <public-device-apis@w3.org>
Message-ID: <6A252AE18765C3468EF06946F24F0B5720A560D25C@XCH102CNC.rim.net>
> I created a demo which implements the Battery Status Events
> specification and (naively) simulates battery-powered user agent
> behavior in JavaScript.

> The Battery Status Events Playground is at:
>   http://dev.w3.org/2009/dap/docs/battery-status/battery-status.html

> A modern browser with support for <input type="range"> is required
> (e.g. recent Chrome, Safari or Opera, sadly Firefox does not support
> this feature at the moment).

To make things more realistic, you should set it up so that it doesn't fire another event if the current value matches the previous value -- i.e. the default state in Firefox.

This also applies to Chrome when it hits level=0 (isPlugged=false) and level=100 (isPlugged=true).

This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
Received on Thursday, 8 September 2011 17:13:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:50 UTC