Re: Ambient light API redesign

On Tue, Aug 26, 2014 at 1:46 PM, Kostiainen, Anssi
<anssi.kostiainen@intel.com> wrote:
> How far are we in terms of getting the needed language-level improvements in ES? I guess await and friends is a ES7 feature?

Well promises are here now. The synchronous syntax sugar will come
later. I used it to show what the code will look like going forward.
Thinking about it some more it should probably be more something like
getValue() as we want to return a new promise each time.


> Also, this proposal supports N number of sensors of the same type (we can pass arguments to the constructor) -- something that the current API cannot do.

I suspect we probably still want a constructor per sensor for ease of
detection, but there could be a generic superclass.


> Re Chromium/Blink implementation, an intent to implement was sent a while ago and the implementation is mostly done. However, the backend code should be reusable if we were to change the API.
>
> I’d be happy to update the spec if we hear no concerns, and work with our folks who are implementing to revise the implementation too. Process-wise, we’ve planning to go to CR, so should we move forward with this redesign, we should postpone not to confuse people.

Sound good. Thanks for the quick reply!


-- 
http://annevankesteren.nl/

Received on Tuesday, 26 August 2014 12:07:20 UTC