Ambient Light Events and JavaScript detection ✩ Mozilla Hacks – the Web developer blog
The idea with an API for ambient light is to be able to detect the light level around the device – especially since there’s a vast difference between being outside in sunlight and sitting in a dim living room – and adapt the user experience based on that.