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

RE: [sensors] the near/far event names

From: Tran, Dzung D <dzung.d.tran@intel.com>
Date: Fri, 11 May 2012 20:24:27 +0000
To: Doug Turner <doug.turner@gmail.com>, Marcos Caceres <marcosscaceres@gmail.com>
CC: "public-device-apis@w3.org" <public-device-apis@w3.org>
Message-ID: <84BCA539DD96614691177EDA3CE4FF0546B14DD4@ORSMSX101.amr.corp.intel.com>
Instead of min and max, can we map into a scale of 0 to 1? 
So, just return

e.value = 0.2
e.proximity = near

e.value = 0.8
e.proximity = far

This also solve the fingerprinting issue.

Dzung Tran

-----Original Message-----
From: Doug Turner [mailto:doug.turner@gmail.com] 
Sent: Friday, May 11, 2012 10:37 AM
To: Marcos Caceres
Cc: public-device-apis@w3.org
Subject: Re: [sensors] the near/far event names

On May 11, 2012, at 10:26 AM, Marcos Caceres wrote:

> What about going with what Robin suggested:  
> window.addEventListener("proximity", function(e){});
> And the Event:
> e.min ...
> e.max ...
> e.value ...
> e.proximity = "far" || "near" ? 

The drawback of this is that if you were just looking for changes in proximity, you might get many other events that aren't significant.  It probably isn't that big of a deal.  It would also allow savoy web developers to determine what the UA's definition of near and far is.

I am happy if we just add this as an optional attribute and move.

Received on Friday, 11 May 2012 20:24:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:53 UTC