- From: Tran, Dzung D <dzung.d.tran@intel.com>
- Date: Fri, 11 May 2012 06:18:29 +0000
- To: Jonas Sicking <jonas@sicking.cc>
- CC: "public-device-apis@w3.org" <public-device-apis@w3.org>
Jonas,
Thanks, but we decided in the DAP WG to work off of the proximity spec while putting the general sensor API on hold.
The proximity spec is at: http://dvcs.w3.org/hg/dap/raw-file/tip/proximity/Overview.html
Thanks
Dzung Tran
-----Original Message-----
From: Jonas Sicking [mailto:jonas@sicking.cc]
Sent: Thursday, May 10, 2012 10:16 PM
To: Tran, Dzung D
Cc: public-device-apis@w3.org
Subject: Re: [Sensor API] Simplified version without discovery
On Tue, Apr 10, 2012 at 8:53 AM, Tran, Dzung D <dzung.d.tran@intel.com> wrote:
> Hello All,
>
> I have checked in my latest sensor API without discovery at:
>
> http://dvcs.w3.org/hg/dap/raw-file/tip/sensor-api/Overview.html
>
> This can be used for further discussion on the sensor API.
I definitely don't think we should do that. addEventListener is a well
established API which has been defined in DOM Events and now DOM Core.
We should not alter its behavior to take something other than a
function which receives an Event object. Note that ES6 will provide a
nicer syntax which will work great with events:
window.addEventListener("proximitysensor", function({ value, min, max }) {
alert("value is " + value);
alert("min is " + min);
alert("max is " + max);
});
You can try this already in Firefox. It works with all event handlers,
including the proximity/ambient light sensor events we recently
landed.
/ Jonas
Received on Friday, 11 May 2012 06:19:10 UTC