Back to Content

Sensor: hasReading property

files/en-us/web/api/sensor/hasreading/index.md

latest413 B
Original Source

{{securecontext_header}}{{APIRef("Sensor API")}}

The hasReading read-only property of the {{domxref("Sensor")}} interface returns a boolean value indicating whether the sensor has a reading.

Because {{domxref('Sensor')}} is a base class, hasReading may only be read from one of its derived classes.

Value

A boolean value.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}