Czytasz angielską wersję tego artykułu, ponieważ nie ma jeszcze tłumaczenia dla tego języka. Pomóż nam przetłumaczyć ten artykuł!
Specifies an event listener to receive devicelight
events. These events occur when the device's light level sensor detects a change in the intensity of the ambient light level.
Syntax
window.ondevicelight = funcRef
Where funcRef
is a function to be called when the devicelight
event occurs. These events are of type DeviceLightEvent
.
Specifications
Specification | Status | Comment |
---|---|---|
Ambient Light Sensor The definition of 'Ambient Light Events' in that specification. |
Candidate Recommendation | Initial definition |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ondevicelight | Chrome No support No | Edge Full support 13 | Firefox No support 22 — 60 | IE No support No | Opera No support No | Safari No support No | WebView Android No support No | Chrome Android No support No | Firefox Android Full support 15 | Opera Android No support No | Safari iOS No support No | Samsung Internet Android ? |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown