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

RE: Battery Status Event Spec

From: Suresh Chitturi <schitturi@rim.com>
Date: Fri, 8 Apr 2011 14:10:52 -0500
Message-ID: <5BC614EAB4C2384099E0B386F0E4BFB5595D7E@XCH04ADS.rim.net>
To: "Anssi Kostiainen" <anssi.kostiainen@nokia.com>, <public-device-apis@w3.org>

-----Original Message-----
From: public-device-apis-request@w3.org
[mailto:public-device-apis-request@w3.org] On Behalf Of Anssi Kostiainen
Sent: Thursday, April 07, 2011 8:36 AM
To: public-device-apis@w3.org Group WG
Subject: Re: Battery Status Event Spec

On 6.4.2011, at 16.46, ext Suresh Chitturi wrote:

> Thanks for the Editor's draft.
> I like the approach here based off of the events model but wondering
> there should be an alternate way as well such as the one shot API.
> The idea is specify a core interface with battery info that can be
> by event model and navigator implementations to allow for
> flexibility/choice for implementations and developers.

I added an example how to assign a function expression (aka anonymous
function) to the onbatterystate property. It provides a simpler (in
terms of loc) alternative. Do you think that would satisfy your concern
re flexibility/choice?

My concern re exposing this information on navigator is that it makes
the misuse easier (think using setInterval() with a 1 ms delay to poll
the properties).

Suresh>> This alternative works for me Anssi, however, I was just
looking for a way to minimize the event generation and let the
developers poll for this info as needed...perhaps battery status change
occurs too often compared some other properties.


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 Friday, 8 April 2011 19:12:02 UTC

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