Re: Ambient light API redesign

On Tue, Aug 26, 2014 at 11:17 PM, Marcos Caceres <> wrote:

> We are actually discussing this on Twitter right now. It seems you don't
> need the promise. The constructor causes the subscription to the sensor,
> and then you can potentially just observe `.value` until it gets updated.

How do you handle permissioning with that model?

More precisely, how do you handle cases when access is refused?

Should there be an onerror callback?

Secondly, must the onchange event be called when .value is changed from
null to its first value? Seems to be useful in a number of scenarios (e.g.
do something with the first value and do it again whenever there's a value


Received on Friday, 29 August 2014 11:06:12 UTC