ambientlight.js 473 B

12345678910111213141516
  1. /*!
  2. {
  3. "name": "Ambient Light Events",
  4. "property": "ambientlight",
  5. "notes": [{
  6. "name": "W3C Spec",
  7. "href": "https://www.w3.org/TR/ambient-light/"
  8. }]
  9. }
  10. !*/
  11. /* DOC
  12. Detects support for the API that provides information about the ambient light levels, as detected by the device's light detector, in terms of lux units.
  13. */
  14. define(['Modernizr', 'hasEvent'], function(Modernizr, hasEvent) {
  15. Modernizr.addTest('ambientlight', hasEvent('devicelight', window));
  16. });