A Polyfill for the Ambient light API
Upon research of the spec, and implementation, it is found that this is likely not possible to perfectly polyfill the spec. The spec states to return the ambient light level in a measurement called "lux." In order to properly record this level, it requires information about the camera used. Information like ISO and f-stop. Browsers do not have an API to access camera information, so it is likely we can never properly calculate the lux level. Although I will keep researching this.
If you'd like to contribute, email me at [email protected]
I'm still developing this code. Once it's in a stable workable state it'll be pushed up here.