RE: Battery Status Event Spec

-----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
if
> 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
used
> 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.

-Anssi

---------------------------------------------------------------------
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