timestamp
Summary
Represents the time when the Position object was acquired, represented as a DOMTimeStamp.
Property of apis/geolocation/Positionapis/geolocation/Position
Syntax
Note: This property is read-only.
var result = Position.timestamp;
Return Value
Returns an object of type
DOMTimeStamp
Examples
//Assuming the variable fresh_threshold has been set
if (position.timestamp < fresh_threshold) {
// The position is relatively recent.
} else {
// The position is potentially outdated.
}
Related specifications
- W3C Geolocation Specification
- W3C Editor’s Draft
Attributions
Microsoft Developer Network: Windows Internet Explorer API reference Article