DeviceLightEvent.value

The value property provides the current level of the ambient light.

Syntax

var light = instanceOfDeviceLightEvent.value;

Value

A positive number representing a light intensity expressed in lux.

Specifications

Specification Status Comment
Ambient Light Sensor
The definition of 'Ambient Light Events' in that specification.
Working Draft Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No Yes

601 2

223

No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No No Yes

601 2

15

No No ?

1. Disabled by default. See bug 1359076.

2. From version 60: this feature is behind the device.sensors.ambientLight.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

3. Not supported for macbook with touchbar and Windows 7.

See also

Document Tags and Contributors

Last updated by: connorshea,