tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

geolocation.idl (1875B)


      1 // GENERATED CONTENT - DO NOT EDIT
      2 // Content was automatically extracted by Reffy into webref
      3 // (https://github.com/w3c/webref)
      4 // Source: Geolocation (https://w3c.github.io/geolocation/)
      5 
      6 partial interface Navigator {
      7  [SameObject] readonly attribute Geolocation geolocation;
      8 };
      9 
     10 [Exposed=Window]
     11 interface Geolocation {
     12  undefined getCurrentPosition (
     13    PositionCallback successCallback,
     14    optional PositionErrorCallback? errorCallback = null,
     15    optional PositionOptions options = {}
     16  );
     17 
     18  long watchPosition (
     19    PositionCallback successCallback,
     20    optional PositionErrorCallback? errorCallback = null,
     21    optional PositionOptions options = {}
     22  );
     23 
     24  undefined clearWatch (long watchId);
     25 };
     26 
     27 callback PositionCallback = undefined (
     28  GeolocationPosition position
     29 );
     30 
     31 callback PositionErrorCallback = undefined (
     32  GeolocationPositionError positionError
     33 );
     34 
     35 dictionary PositionOptions {
     36  boolean enableHighAccuracy = false;
     37  [Clamp] unsigned long timeout = 0xFFFFFFFF;
     38  [Clamp] unsigned long maximumAge = 0;
     39 };
     40 
     41 [Exposed=Window, SecureContext]
     42 interface GeolocationPosition {
     43  readonly attribute GeolocationCoordinates coords;
     44  readonly attribute EpochTimeStamp timestamp;
     45  [Default] object toJSON();
     46 };
     47 
     48 [Exposed=Window, SecureContext]
     49 interface GeolocationCoordinates {
     50  readonly attribute double accuracy;
     51  readonly attribute double latitude;
     52  readonly attribute double longitude;
     53  readonly attribute double? altitude;
     54  readonly attribute double? altitudeAccuracy;
     55  readonly attribute double? heading;
     56  readonly attribute double? speed;
     57  [Default] object toJSON();
     58 };
     59 
     60 [Exposed=Window]
     61 interface GeolocationPositionError {
     62  const unsigned short PERMISSION_DENIED = 1;
     63  const unsigned short POSITION_UNAVAILABLE = 2;
     64  const unsigned short TIMEOUT = 3;
     65  readonly attribute unsigned short code;
     66  readonly attribute DOMString message;
     67 };