W3C home > Mailing lists > Public > public-device-apis@w3.org > May 2012

Re: [sensors] Device Proximity (was: Device light and proximity sensor)

From: Marcos Caceres <w3c@marcosc.com>
Date: Wed, 9 May 2012 22:01:22 +0100
To: Tran, Dzung D <dzung.d.tran@intel.com>
Cc: Doug Turner <dougt@mozilla.com>, Anssi Kostiainen <anssi.kostiainen@nokia.com>, "public-device-apis@w3.org public-device-apis@w3.org" <public-device-apis@w3.org>
Message-ID: <8201DAE49D5C4C4B826F2910482A30C3@marcosc.com>


On Wednesday, May 9, 2012 at 9:59 PM, Marcos Caceres wrote:

> 
> 
> On Wednesday, May 9, 2012 at 9:49 PM, Tran, Dzung D wrote:
> 
> > Also, What happens when a page register for the same event multiple times? 
> > Would you get multiple callbacks? I don't see a use case where you would want to do this, beside a programming mistake.
> 
> 
> 
> This is fine, as it de-cuples components from the events: 
> 
> window.addEventListener("proximity", menu.pChange);
> window.addEventListener("proximity", fadeScreen);

decouples even :P
Received on Wednesday, 9 May 2012 21:01:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 21:01:56 GMT