This document describes the known errata and proposed corrections for the W3C Geolocation API published as a Recommendation on October 24 2013.

WebIDL improvements

Given the evolution of WebIDL, the following changes would better match

  1. the NavigatorGeolocation interface would be better expressed as a partial interface;
  2. the prose describe that timeout and maximumAge in PositionOptions can take infinite values, but Infinite gets converted to 0 for values of type long;
  3. the interface 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

Proposed correction:

  1. the interface NavigatorGeolocation should be rewritten as:
    partial interface Navigator {
      readonly attribute Geolocation geolocation;
    };
  2. using the [Clamp] extended attribute gets Infinite properly converted to the maximum value of the integer type;
  3. The WebIDL declaration of PositionOptions should be changed to:

    dictionary PositionOptions {
        boolean enableHighAccuracy = false;
        [Clamp] unsigned long timeout = 0xFFFFFFFF;
        [Clamp] unsigned long maximumAge = 0;
      };
    

    In 5.1, the pre-processing steps of 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.

Conformance requirements

  1. The sentence starting with “Objects implementing the Navigator interface” is redundant with WebIDL and can be removed;
  2. the getCurrentPosition and “watch process” algorithms are indicated as “should execute the following set of steps”; the steps in the algoritms are in fact mandatory.

Proposed corrections:

  1. Remove second paragraph of section 5.1
  2. Replace “should execute” with “must execute” in the getCurrentPosition and “watch process” algorithms

References

  1. The list editors for the [BROWSINGCONTEXT] and [NAVIGATOR] references (linked to HTML5) is incorrect;
  2. The full stop after the title of the URI spec should be moved before the space;
  3. Instead of The DOMTimeStamp Type, a more useful reference is the one defined in WebIDL
  4. RFC3066 is listed in the references, but not used in the specification, and should be removed

This document is a place-holder for errata to be published on the W3C Geolocation API dated of October 24 2013.


Lars Erik Bolstad, Chair, Opera Software
Dominique Hazaël-Massieux <dom@w3.org> and Jinsong Wang <wjs@w3.org, Team Contacts, W3C

$Revision: 1.6 $
  翻译: