AmbientLightSensor.AmbientLightSensor()
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
非标准: 该特性尚未标准化。我们不建议在生产环境中使用非标准特性,因为它们在浏览器中的支持有限,且可能发生变化或被移除。不过,在没有标准选项的特定情况下,它们可以作为合适的替代方案。
通过 AmbinentLightSensor()
构造函数可以创建一个 AmbientLightSensor
的实例。
语法
var ambientLightSensor = new AmbientLightSensor(options)
参数
- options 可选
-
以下是设置属性:
frequency
: TBD
规范
Specification |
---|
Ambient Light Sensor # dom-ambientlightsensor-ambientlightsensor |