The Proposed correction: Given the evolution of WebIDL, the following changes would better match
Proposed correction: The WebIDL declaration of PositionOptions should be changed to: In 5.1, the pre-processing steps of Proposed correction: Proposed corrections:Geolocation interface should not have a [NoInterfaceObject] extended attribute.
interface Geolocation {
void getCurrentPosition(PositionCallback successCallback,
optional PositionErrorCallback errorCallback,
optional PositionOptions options);
long watchPosition(PositionCallback successCallback,
optional PositionErrorCallback errorCallback,
optional PositionOptions options);
void clearWatch(long watchId);
};
WebIDL improvements
PositionOptions would be better written as a dictionary with default values matching the prose description of 5.2; the said prose can then be reduced
dictionary PositionOptions {
boolean enableHighAccuracy = false;
[Clamp] unsigned long timeout = Infinity;
[Clamp] unsigned long maximumAge = 0;
};
getCurrentPosition and “watch process” are removed. In 5.2, the text describing the default values of enableHighAccuracy, timeout and maximumAge (paragraphs 5, 7 and 10 in that section) are removed.Infinite values in algorithms
timeout and maxAge options in getCurrentPosition and watchPosition allude to infinite values, which are not compatible with the long type
getCurrentPosition as follows: “If timeout is present, start a timer that will fire after the number of milliseconds denoted by the value of the timeout variable. When the timer fires, cancel any ongoing location acquisition operations associated with this instance of the steps, invoke the errorCallback (if present) with a new PositionError object whose code attribute is set to TIMEOUT, and exit this set of steps.”Infinity in the specConformance requirements
Navigator interface” is redundant with WebIDL and can be removed;getCurrentPosition and “watch process” algorithms are indicated as “should execute the following set of steps”; the steps in the algoritms are in fact mandatory.
getCurrentPosition and “watch process” algorithmsReferences
This document is a place-holder for errata to be published on the W3C Geolocation API dated of October 24 2013.