• Skip to main content
  • Skip to search
  • Skip to select language
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web technology for developers
  2. Web APIs
  3. Sensor
  4. Sensor.hasReading

Table of contents

  • Value
  • Specifications
  • Browser compatibility

Sensor.hasReading

The hasReading read-only property of the Sensor interface returns a boolean value indicating whether the sensor has a reading.

Because Sensor is a base class, hasReading may only be read from one of its derived classes.

Value

A boolean value.

Specifications

Specification
Generic Sensor API
# sensor-has-reading

Browser compatibility

BCD tables only load in the browser

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Apr 1, 2022, by MDN contributors

Related Topics

  1. Sensor APIs
  2. Sensor
  3. Properties
    1. activated
    2. hasReading
    3. timestamp
  4. Methods
    1. start()
    2. stop()
  5. Events
    1. activate
    2. error
    3. reading
  6. Inheritance:
    1. EventTarget
  7. Related pages for Sensor API
    1. AbsoluteOrientationSensor
    2. Accelerometer
    3. AmbientLightSensor
    4. GravitySensor
    5. Gyroscope
    6. LinearAccelerationSensor
    7. Magnetometer
    8. OrientationSensor
    9. RelativeOrientationSensor
    10. SensorErrorEvent
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

  • MDN on Twitter
  • MDN on Github

Mozilla

  • Mozilla on Twitter
  • Mozilla on Instagram

© 2005-2022 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies