Getting started with the Ambient Light Sensor
Dean Hume a fait du très bon travail avec PWA récemment, et il a également exploré beaucoup des nouvelles API de la plate-forme, en l’occurrence l’API Generic Sensor: The Ambient Light Sensor API provides developers with the means to determine ambient light levels as detected by the device’s main light detector. This information is available to developers in terms of lux units. If you are building a Progressive Web App and you want to style it differently depending on the light levels in the room, then this could be the feature for you.