If a device supports geolocation, you can use the geolocation API to obtain the current geographical location of the device. If the device supports this feature, you can obtain geolocation information. This information includes the altitude, accuracy, heading, speed, and timestamp of the latest change in the location.

The Geolocation class dispatches update events in response to the device’s location sensor. The update event is a GeolocationEvent object.