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 21:59:46 +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: <0E6298D9D4394820846F72CC00EDB97D@marcosc.com>


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);
Received on Wednesday, 9 May 2012 21:00:18 GMT

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