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

Re: Light sensor - strawman proposal

From: Marcos Caceres <marcosscaceres@gmail.com>
Date: Thu, 12 Jul 2012 19:37:22 +0100
To: Doug Turner <dougt@mozilla.com>
Cc: BALAJI NERELLA VENKATARAMANA <nv.balaji@samsung.com>, public-device-apis@w3.org
Message-ID: <3BE49A0CF34447448F98C5C80A607413@gmail.com>



On Thursday, 12 July 2012 at 17:17, Doug Turner wrote:

>  
> Please see:
>  
> http://dougturner.wordpress.com/2012/03/26/device-light-sensor/  
Ok, so if we go with the above:

[Constructor(DOMString type, optional LightEventInit eventInitDict)]
interface DeviceLightEvent : Event {
   readonly attribute double value;  
}

dictionary LightEventInit : EventInit  {
   double value;
}

* Where "EventInit" is defined in DOM4.  

And then one can still feature check using the DeviceLightEvent interface prototype object, which is nice:

if(window.DeviceLightEvent){ … }

Doug, BTW, your post implied that it should be in FF 15… I tried seeing if it was implemented in Aurora, but no joy. Any idea when the API might become available?  

Kind regards,
Marcos  
Received on Thursday, 12 July 2012 18:37:54 UTC

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