Re: Ambient light API redesign

On Tue, Aug 26, 2014 at 2:43 AM, Anne van Kesteren <> wrote:
> Perhaps something like this:
>   var as = new AmbientSensor()
>   var currentVal = await as.value
>   as.onvaluechange = ...

Would as.value just return a Promise reflecting the first reading? And
after that it would quickly be outdated? If so that could potentially
be confusing. Or does the property return a new, immediately resolved,
Promise every time that onvaluechange fires?

/ Jonas

Received on Tuesday, 26 August 2014 20:59:15 UTC