Change description:
This change allows the developer to access sensor data, in this case Ambient Light Sensor data in a more consistent way.
Changes to API surface:
Old way:
window.addEventListener('devicelight', function(event) {
console.log(event.value);
});
New way:
var s = new AmbientLightSensor();
s.start();
s.onchange = event => console.log(event.reading.illuminance);
s.stop();
Links:
Public standards discussion:
https://w3c.github.io/sensors/
http://w3c.github.io/ambient-light/
Support in other browsers:
Edge: Positive
Firefox: Positive
Safari: No signals
Comment 1 by dongseon...@intel.com, Apr 26 2016