Geolocation API
Geolocation API
W3C Working Draft
24 November 2021
More details about this document
This version:
Latest published version:
Latest editor's draft:
History:
Commit history
Test suite:
Implementation report:
Editor:
Marcos Cáceres
W3C
Former editor:
Andrei Popescu
Google Inc.
Feedback:
GitHub w3c/geolocation-api
pull requests
new issue
open issues
Browser support (caniuse.com):
5–98
3.5–95
2–3
5–15.1
3.1–4
12–94
More info
2021
W3C
MIT
ERCIM
Keio
Beihang
). W3C
liability
trademark
and
permissive document license
rules apply.
Abstract
The Geolocation API provides access to geographical location
information associated with the hosting device.
Status of This Document
This section describes the status of this
document at the time of its publication. A list of current
W3C
publications and the latest revision of this technical report can be found
in the
W3C
technical reports index
at
The Devices and Sensors Working Group is updating this specification in
the hope of making it a "living standard". As such, we've dropped the
"Editions" and aim to continue publishing updated
W3C
Recommendations
of this specification as we add new features or fix bugs.
This document was published by the
Devices and Sensors Working Group
as
a Working Draft using the
Recommendation track
Publication as a Working Draft does not
imply endorsement by
W3C
and its Members.
This is a draft document and may be updated, replaced or obsoleted by other
documents at any time. It is inappropriate to cite this document as other
than work in progress.
Future updates to this specification may incorporate
new features
This document was produced by a group
operating under the
W3C
Patent
Policy
W3C
maintains a
public list of any patent disclosures
made in connection with the deliverables of
the group; that page also includes
instructions for disclosing a patent. An individual who has actual
knowledge of a patent which the individual believes contains
Essential Claim(s)
must disclose the information in accordance with
section 6 of the
W3C
Patent Policy
This document is governed by the
2 November 2021
W3C
Process Document
1.
Introduction
This section is non-normative.
The
Geolocation API
defines a high-level interface to
location information associated only with the device hosting the
implementation. Common sources of location information include Global
Positioning System (GPS) and location inferred from network signals
such as IP address, RFID, WiFi and Bluetooth MAC addresses, and
GSM/CDMA cell IDs, as well as user input. The API itself is agnostic of
the underlying location information sources, and no guarantee is given
that the API returns the device's actual location.
If an end user
grants permission
, the
Geolocation API
Provides location data as latitude, longitude, altitude, speed, and
heading, as well as the accuracy of the acquired location data, and the
approximate time for when the position was acquired via the
GeolocationPosition
interface.
Supports "one-shot" position updates via the
getCurrentPosition
()
method and the ability to receive
updates for when the position of the hosting device significantly
changes via the
watchPosition
()
method.
Using the
PositionOptions
's
maximumAge
allows an application to request a cached position whose age is no
greater than a specified value (only the last position is cached).
Provides a way for the application to receive updates about errors,
as a
GeolocationPositionError
, that have occurred while
acquiring a position
And through
enableHighAccuracy
, supports
requesting "high accuracy" position data, though the request can be
ignored by the user agent.
1.1
Scope
This section is non-normative.
This specification is limited to providing a scripting API for
retrieving geographic position information associated with a hosting
device. The geographic position information is provided in terms of
World Geodetic System coordinates [
WGS84
]. It does not include
providing a markup language of any kind, nor does not include
defining a new URL scheme for building URLs that identify geographic
locations.
1.2
Change log
This section is non-normative.
Since First Public Working Draft in 2021, the
Geolocation
API
has received the following normative changes:
Switch DOMTimeStamp to EpochTimeStamp
#104
Return 0 when watchPosition() errors
#100
Callback with error if doc is not fully active
#97
Gracefully handle documents that are not fully active
#90
Add "geolocation task queue"
#87
Handle OS-level permission change
#109
Suggest permission lifetime
#108
Since publication of the Second Edition in 2016, this specification
has received the following changes:
Request position
only proceeds when a document is visible, or
the document becomes visible.
Clarified how caching works as part of
acquiring a position
only last position is cached, and can be evicted at any time.
Now relies on the
Permissions
specification to handle
permission grants, and user interface requirements.
The
errorCallback
is now nullable.
The API can be controlled by
Permissions Policy
, which
restricts how/where the API is exposed to web pages.
The
callbacks
are no longer treated as "EventHandler" objects
(i.e., objects that have a
.handleEvent()
method), but are now
exclusively treated as IDL callback functions.
The API is now only exposed in Secure Contexts (i.e., only
available in HTTPS).
The interfaces no longer use [
WebIDL
]'s legacy
[NoInterfaceObject]
, so
Geolocation
and other interface of this
spec are now in the global scope. Also, the interfaces were renamed
from
NavigatorGeolocation*
to just
Geolocation*
See the
commit
history
for a complete list of changes.
2.
Examples
This section is non-normative.
The API is designed to enable both "one-shot" position requests and
repeated position updates. The following examples illustrate common use
cases.
2.1
Get current position
This section is non-normative.
Request the user's current location. If the user allows it, you will
get back a position object.
Example
: A one-shot position request
navigator.geolocation.getCurrentPosition(
position
=>
const
{ latitude, longitude } = position.coords;
// Show a map centered at latitude / longitude.
});
2.2
Watch a position
This section is non-normative.
Request the ability to watch user's current location. If the user
allows it, you will get back continuous updates of the user's
position.
Example
: Watching a position for repeated updates
const
watchId = navigator.geolocation.watchPosition(
position
=>
const
{ latitude, longitude } = position.coords;
// Show a map centered at latitude / longitude.
});
2.3
Stop watching a position
This section is non-normative.
Stop watching for position changes by calling the
clearWatch
()
method.
Example
: Using clearWatch()
const
watchId = navigator.geolocation.watchPosition(
position
=>
console
.log(position)
);
function
buttonClickHandler
// Cancel the updates when the user clicks a button.
navigator.geolocation.clearWatch(watchId);
And a HTML
button
that when pressed stops watching the position.
button
onclick
"buttonClickHandler()"
Stop watching location
button
2.4
Handling errors
This section is non-normative.
When an error occur, the second argument of the
watchPosition
()
or
getCurrentPosition
()
method gets called with a
GeolocationPositionError
error, which can help you figure out
what might have gone wrong.
Example
: Handling errors
// Request repeated updates.
const
watchId = navigator.geolocation.watchPosition(
scrollMap, handleError
);
function
scrollMap
position
const
{ latitude, longitude } = position.coords;
// Scroll map to latitude / longitude.
function
handleError
error
// Display error based on the error code.
const
{ code } = error;
switch
(code) {
case
GeolocationPositionError.TIMEOUT:
// Handle timeout.
break
case
GeolocationPositionError.PERMISSION_DENIED:
// User denied the request.
break
case
GeolocationPositionError.POSITION_UNAVAILABLE:
// Position not available.
break
2.5
Using
maximumAge
as cache control
This section is non-normative.
By default, the API always attempts to return a cached position so
long as it has a previously acquired position. In this example, we
accept a position whose age is no greater than 10 minutes. If the
user agent does not have a fresh enough cached position object, it
automatically acquires a new position.
Example
: Getting cached position
navigator.geolocation.getCurrentPosition(
successCallback,
console
.error,
maximumAge
600_000
);
function
successCallback
position
// By using the 'maximumAge' member above, the position
// object is guaranteed to be at most 10 minutes old.
2.6
Using
timeout
If you require location information in a time sensitive manner, you
can use the
PositionOptions
timeout
member to
limit the amount of time you are willing to wait to
acquire a position
Example
: Timing out a position request
// Request a position. We are only willing to wait 10
// seconds for it.
navigator.geolocation.getCurrentPosition(
successCallback,
errorCallback,
timeout
10_000
);
function
successCallback
position
// Request finished in under 10 seconds...
function
errorCallback
error
switch
(error.code) {
case
GeolocationPositionError.TIMEOUT:
// We didn't get it in a timely fashion.
doFallback();
// Acquire a new position object,
// as long as it takes.
navigator.geolocation.getCurrentPosition(
successCallback, errorCallback
);
break
case
"..."
// treat the other error cases.
function
doFallback
{}
2.7
Enabling the API in third-party contexts
This section is non-normative.
The
default allowlist
of
'self'
allows Geolocation API usage
in same-origin nested frames but prevents third-party content from
using the API.
Third-party usage can be selectively enabled by adding the
allow
="geolocation"
attribute to an
iframe
element:
Example
: Enabling the Geolocation API in an iframe
iframe
src
"https://third-party.com"
allow
"geolocation"
iframe
Alternatively, the API can be disabled in a first-party context by
specifying an HTTP response header:
Example
: Permissions Policy over HTTP
Permissions-Policy: geolocation=()
See
Permissions Policy
for more details about the
Permissions-Policy
HTTP header.
3.
Privacy and security considerations
This section is non-normative.
The API defined in this specification is used to retrieve the
geographic location of a hosting device. In almost all cases, this
information also discloses the location of the user of the device,
thereby potentially compromising the user's privacy.
3.1
User consent
This section is non-normative.
The
Geolocation API
is a
powerful feature
that
requires
express permission
from an end-user before any location
data is shared with a web application. This requirement is
normatively enforced by the
check permission
steps on which the
getCurrentPosition
()
and
watchPosition
()
methods rely.
An end-user will generally give
express permission
through a user
interface, which usually present a range of permission
lifetimes
that the end-user can choose from. The
choice of
lifetimes
vary across user agents, but they
are typically time-based (e.g., "a day"), or until browser is closed,
or the user might even be given the choice for the permission to be
granted indefinitely. The permission
lifetimes
dictate
how long a user agent
grants
a permission before that
permission is automatically reverted back to its default
permission state
, prompting the end-user to make a new choice upon subsequent
use.
Although the granularity of the permission
lifetime
varies across user-agents, this specification urges user agents to
limit the lifetime to a single browsing session by default (see
5.6
Check permission
for normative requirements).
3.2
Privacy considerations for recipients of location information
This section is non-normative.
Note
: Developers' responsibility with this sensitive data
This section applies to "recipients", which generally means
developers utilizing the
Geolocation API
. Although it's
impossible for the user agent, or this specification, to enforce
these requirements, developers need to read this section carefully
and do their best to adhere to the suggestions below. Developers need
to be aware that there might be privacy laws in their jurisdictions
that can govern the usage and access to users' location data.
Recipients ought to only request position information when necessary,
and only use the location information for the task for which it was
provided to them. Recipients ought to dispose of location information
once that task is completed, unless expressly permitted to retain it
by the user. Recipients need to also take measures to protect this
information against unauthorized access. If location information is
stored, users need to be allowed to update and delete this
information.
The recipients of location information need to refrain from
retransmitting the location information without the user’s express
permission. Care needs to be taken when retransmitting and the use of
encryption is encouraged.
Recipients ought to clearly and conspicuously disclose the fact that
they are collecting location data, the purpose for the collection,
how long the data is retained, how the data is secured, how the data
is shared if it is shared, how users can access, update and delete
the data, and any other choices that users have with respect to the
data. This disclosure needs to include an explanation of any
exceptions to the guidelines listed above.
3.3
Implementation considerations
This section is non-normative.
Implementers are advised to consider the following aspects that can
negatively affect the privacy of their users: in certain cases, users
can inadvertently grant permission to the user agent to disclose
their location to websites. In other cases, the content hosted at a
certain URL changes in such a way that the previously granted
location permissions no longer apply as far as the user is concerned.
Or the users might simply change their minds.
Predicting or preventing these situations is inherently difficult.
Mitigation and in-depth defensive measures are an implementation
responsibility and not prescribed by this specification. However, in
designing these measures, implementers are advised to enable user
awareness of location sharing, and to provide access to user
interfaces that enable revocation of permissions.
MDN
Navigator/geolocation
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
10.6+
Opera Android
11+
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
4.
Extensions to the
Navigator
interface
WebIDL
partial interface
Navigator
SameObject
] readonly attribute
Geolocation
geolocation
};
MDN
Geolocation
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
10.6+
Opera Android
11+
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
5.
Geolocation
interface and callbacks
WebIDL
Exposed
Window
interface
Geolocation
undefined
getCurrentPosition
PositionCallback
successCallback
optional
PositionErrorCallback
errorCallback
= null,
optional
PositionOptions
options
= {}
);
long
watchPosition
PositionCallback
successCallback
optional
PositionErrorCallback
errorCallback
= null,
optional
PositionOptions
options
= {}
);
undefined
clearWatch
long
watchId
);
};
callback
PositionCallback
undefined
GeolocationPosition
position
);
callback
PositionErrorCallback
undefined
GeolocationPositionError
positionError
);
5.1
Internal slots
Instances of
Geolocation
are created with the internal slots in
the following table:
Internal slot
Description
[[cachedPosition]]
GeolocationPosition
, initialized to null. It's a reference
to the last acquired position and serves as a cache. A user agent
MAY
evict
[[cachedPosition]]
by resetting it to
null at any time for any reason.
[[watchTasks]]
Initialized as an empty
set
of
unsigned long
items
, which represent the identifier for timed
task
MDN
Geolocation/getCurrentPosition
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
10.6+
Opera Android
11+
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
5.2
getCurrentPosition()
method
The
getCurrentPosition
successCallback
errorCallback
options
method steps are:
If the
current settings object
's
associated
Document
is
not
fully active
call back with error
errorCallback
and
POSITION_UNAVAILABLE
Otherwise,
request position
, passing
successCallback
errorCallback
options
, and (repeats) false.
Return
undefined
MDN
Geolocation/watchPosition
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
10.6+
Opera Android
11+
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
5.3
watchPosition()
method
The
watchPosition
successCallback
errorCallback
options
method steps are:
If the
current settings object
's
associated
Document
is
not
fully active
Call back with error
errorCallback
and
POSITION_UNAVAILABLE
Return 0.
Let
watchId
be
request position
, passing
successCallback
errorCallback
options
, and (repeats) true.
Return
watchId
MDN
Geolocation/clearWatch
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
10.6+
Opera Android
11+
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
5.4
clearWatch()
method
When
clearWatch()
is invoked, the user agent
MUST
If
this
's
[[watchTasks]]
watchId
exists
remove
this
's
[[watchTasks]]
watchId
].
5.5
Request position
Request position
by passing a
PositionCallback
successCallback
, a
PositionErrorCallback
errorCallback
PositionOptions
options
, a
boolean
repeats
, and
optionally (and only if
repeats
is true) a
previousId
Let
watchTasks
be
this
's
[[watchTasks]]
If
previousId
was provided, let
watchId
be
previousId
Otherwise, let
watchId
be an
implementation-defined
long
that is greater than or equal to zero.
Append
watchId
to
watchTasks
Let
global
be
this
's
relevant global object
Queue a global task
using the
geolocation task source
with
global
to run the following steps
in parallel
Do security check.
If the
environment settings object
is a
non-secure context
, then:
Call back with error
errorCallback
and
PERMISSION_DENIED
Remove
watchId
from
watchTasks
Terminate this algorithm.
Let
document
be the
current settings object
's
associated Document
If
document
's
visibility state
is
"hidden", wait for the following
page visibility change steps
steps to run:
Assert:
document
's
visibility state
is
"visible".
Continue to the next step below.
Check permission
passing
errorCallback
. If the check
returns failure:
Remove
watchId
from
watchTasks
Terminate this algorithm.
Acquire
position
Let
acquisitionTime
be a new
EpochTimeStamp
that represents now.
If
options
maximumAge
is greater
than 0, and
cachedPosition
is not null:
Let
cachedPosition
be
this
's
[[cachedPosition]]
Let
cacheTime
be
acquisitionTime
minus the
value of
options
maximumAge
member.
If
cachedPosition
's
timestamp
's value is greater than
cacheTime
, and
cachedPosition
[[isHighAccuracy]]
equals
options
enableHighAccuracy
Queue a task
on the
geolocation task source
with a step that
invokes
successCallback
with
cachedPosition
Go to
determine
repetition
steps below.
Let
timeout
be a new timed
task
that runs in
options
timeout
milliseconds after
acquisitionTime
, which performs the following sub-steps:
Note
: Immediate cancellation
An
options
timeout
value 0
effectively runs the
timeout
task immediately.
If the entry for
timerId
in the
list of active timers
has been cleared, then abort these steps.
Call back with error
with
errorCallback
and
TIMEOUT
Let
timerId
be an
implementation-defined
identifier that represents
timeout
Add
timerId
to the
list of active timers
Try to acquire the device's position, optionally taking
into consideration the value of
options
enableHighAccuracy
If acquiring a position succeeds:
Let
position
be
a new
GeolocationPosition
passing
acquisitionTime
and
options
enableHighAccuracy
Set
this
's
[[cachedPosition]]
to
position
Queue a task
on the
geolocation task source
with a step that
invokes
successCallback
with
position
If acquiring a position fails because of one of the
following reasons:
Underlying system denies permission:
Call back with error
passing
errorCallback
and
PERMISSION_DENIED
Note
: Browser permission VS OS permission
On certain platforms, there can be a
circumstance where the user has
granted
the user agent
permission to use Geolocation, but the
permission to access location services has been
denied at the OS level.
Data acquisition error:
Call back with error
passing
errorCallback
and
POSITION_UNAVAILABLE
Clear
timerId
from the
list of active timers
Determine repetition
If
repeats
is false:
Remove
watchId
from
watchTasks
Terminate this algorithm.
Wait for a significant change of
geographic position
. What constitutes a significant
change of geographic position is left to the implementation.
User agents
MAY
impose a rate limit on the frequency position
changes.
If
document
is not
fully active
or not
visibility state
is "visible", go back to the
previous step and again
wait for
significant change of geographic position
Note
: Position updates are exclusively for fully-active visible documents
The desired effect here being that position updates are
exclusively delivered to fully active documents that are
visible; Otherwise the updates get silently "dropped on the
floor". Only once a document again becomes fully active and
visible (e.g., an
iframe
gets reattached to a parent
document), do the position updates once again start getting
delivered.
If
watchTasks
contains
watchId
, then:
Request position
passing
successCallback
errorCallback
options
repeats
, and
watchId
Return
watchId
5.6
Check permission
The
Geolocation API
is a
default powerful feature
The user agent
MAY
suggest time-based
permission
lifetimes
, such as "24 hours", "1 week", or choose to
remember the permission [permission/grant=] indefinitely. However, it
is
RECOMMENDED
that a user agent prioritize restricting the
permission
lifetime
to a single session: This can
be, for example, until the
realm
is
destroyed, the end-user
navigates
away from the
origin
, or
the relevant browser tab is closed.
When instructed to
check permission
, given a
PositionErrorCallback
errorCallback
Let
permission
be
request permission to use
"geolocation".
If
permission
is
denied
", then:
Call back with error
errorCallback
and
PERMISSION_DENIED
Return failure.
5.7
Call back with error
When instructed to
call back with error
, given an
PositionErrorCallback
callback
and an
unsigned short
code
If
callback
is null, return.
Let
error
be a newly created
GeolocationPositionError
instance whose
code
attribute is initialized to
code
Queue a task
on the
geolocation task source
with a step
that
invokes
callback
with
error
6.
PositionOptions
dictionary
WebIDL
dictionary
PositionOptions
boolean
enableHighAccuracy
= false;
Clamp
unsigned long
timeout
= 0xFFFFFFFF;
Clamp
unsigned long
maximumAge
= 0;
};
6.1
enableHighAccuracy
member
The
enableHighAccuracy
member provides a hint that the
application would like to receive the most accurate location data.
The intended purpose of this member is to allow applications to
inform the implementation that they do not require high accuracy
geolocation fixes and, therefore, the implementation
MAY
avoid using
geolocation providers that consume a significant amount of power
(e.g., GPS).
Note
: A word of warning about enableHighAccuracy
The
enableHighAccuracy
member can result in slower response times
or increased power consumption. The user might also disable this
capability, or the device might not be able to provide more
accurate results than if the flag wasn't specified.
6.2
timeout
member
The
timeout
member denotes the maximum length of time,
expressed in milliseconds, before
acquiring a position
expires.
The time spent waiting for the document to become visible and for
obtaining permission to use the API
is not
included in the period covered by the
timeout
member. The
timeout
member only applies when
acquiring a position
begins.
6.3
maximumAge
member
The
maximumAge
member indicates that the web application
is willing to accept a cached position whose age is no greater than
the specified time in milliseconds.
MDN
GeolocationPosition
This feature is in all major engines.
Chrome
Chrome Android
Edge
No
Edge Mobile
Firefox
Firefox Android
4+
Internet Explorer
9+
Opera
16+
Opera Android
16+
Safari
Safari iOS
Samsung Internet
WebView Android
7.
GeolocationPosition
interface
WebIDL
Exposed
Window
SecureContext
interface
GeolocationPosition
readonly attribute
GeolocationCoordinates
coords
readonly attribute
EpochTimeStamp
timestamp
};
MDN
GeolocationPosition/coords
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
16+
Opera Android
16+
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
7.1
coords
attribute
The
coords
attribute contains geographic coordinates.
MDN
GeolocationPosition/timestamp
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
16+
Opera Android
16+
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
7.2
timestamp
attribute
The
timestamp
attribute represents the time when the
geographic position of the device was acquired.
7.3
Internal slots
Instances of
GeolocationPositionError
are created with the
internal slots in the following table:
Internal slot
Description
[[isHighAccuracy]]
boolean
that records the value of the
enableHighAccuracy
member when this
GeolocationPosition
is
created
7.4
Task sources
The following
task source
is defined by this specifications.
The
geolocation task source
Used by this specification to queue up non-blocking
PositionCallback
and
PositionErrorCallback
when performing
position requests
MDN
GeolocationCoordinates
This feature is in all major engines.
Chrome
Chrome Android
Edge
No
Edge Mobile
Firefox
Firefox Android
4+
Internet Explorer
9+
Opera
Opera Android
Safari
Safari iOS
Samsung Internet
1.0+
WebView Android
8.
GeolocationCoordinates
interface
WebIDL
Exposed
Window
SecureContext
interface
GeolocationCoordinates
readonly attribute
double
accuracy
readonly attribute
double
latitude
readonly attribute
double
longitude
readonly attribute
double
altitude
readonly attribute
double
altitudeAccuracy
readonly attribute
double
heading
readonly attribute
double
speed
};
MDN
GeolocationCoordinates/accuracy
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
Opera Android
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
MDN
GeolocationCoordinates/latitude
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
Opera Android
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
MDN
GeolocationCoordinates/longitude
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
Opera Android
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
8.1
latitude
longitude
, and
accuracy
attributes
The
latitude
and
longitude
attributes are
geographic coordinates specified in decimal degrees.
The
accuracy
attribute denotes the accuracy level of the
latitude and longitude coordinates in meters (e.g.,
65
meters).
MDN
GeolocationCoordinates/altitude
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
Opera Android
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
MDN
GeolocationCoordinates/altitudeAccuracy
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
Opera Android
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
8.2
altitude
and
altitudeAccuracy
attributes
The
altitude
attribute denotes the height of the position,
specified in meters above the [
WGS84
] ellipsoid.
The
altitudeAccuracy
attribute represents the altitude
accuracy in meters (e.g.,
10
meters).
MDN
GeolocationCoordinates/heading
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
Opera Android
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
8.3
heading
attribute
The
heading
attribute denotes the direction of travel of
the hosting device and is specified in degrees, where 0° ≤ heading
< 360°, counting clockwise relative to the true north.
MDN
GeolocationCoordinates/speed
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
Opera Android
Safari
5+
Safari iOS
3+
Samsung Internet
1.0+
WebView Android
37+
8.4
speed
attribute
The
speed
attribute denotes the magnitude of the
horizontal component of the hosting device's current velocity in
meters per second.
8.5
Constructing a
GeolocationPosition
A new
GeolocationPosition
is constructed with
EpochTimeStamp
timestamp
and boolean
isHighAccuracy
by performing the following steps:
Let
coords
be a newly created
GeolocationCoordinates
instance:
Initialize
coord
's
latitude
attribute to a geographic coordinate in decimal degrees.
Initialize
coord
's
longitude
attribute to a geographic coordinate in decimal degrees.
Initialize
coord
's
accuracy
attribute to a non-negative real number. The value
SHOULD
correspond to a 95% confidence level with respect to the
longitude and latitude values.
Initialize
coord
's
altitude
attribute in meters above the [
WGS84
] ellipsoid, or
null
if
the implementation cannot provide altitude information.
Initialize
coord
's
altitudeAccuracy
attribute as
non-negative real number, or to
null
if the implementation
cannot provide altitude information. If the altitude accuracy
information is provided, it
SHOULD
correspond to a 95% confidence
level.
Initialize
coord
's
speed
attribute to a non-negative real number, or as
null
if the
implementation cannot provide speed information.
Initialize
coord
's
heading
attribute in degrees, or
null
if the implementation cannot
provide heading information. If the hosting device is stationary
(i.e., the value of the
speed
attribute is 0), then initialize the
heading
to
NaN
Return a newly created
GeolocationPosition
instance with its
coords
attribute initialized to
coords
and
timestamp
attribute initialized to
timestamp
, and its
[[isHighAccuracy]]
internal slot set to
isHighAccuracy
MDN
GeolocationPositionError
Chrome
Chrome Android
Edge
No
Edge Mobile
Firefox
Firefox Android
4+
Internet Explorer
9+
Opera
16+
Opera Android
16+
Safari
5+
Safari iOS
4.2+
Samsung Internet
WebView Android
9.
GeolocationPositionError
interface
WebIDL
Exposed
Window
interface
GeolocationPositionError
const
unsigned short
PERMISSION_DENIED
= 1;
const
unsigned short
POSITION_UNAVAILABLE
= 2;
const
unsigned short
TIMEOUT
= 3;
readonly attribute
unsigned short
code
readonly attribute
DOMString
message
};
9.1
Constants
PERMISSION_DENIED
(numeric value 1)
Request position
failed because the user denied permission to
use the API.
POSITION_UNAVAILABLE
(numeric value 2)
Acquire a position
failed.
TIMEOUT
(numeric value 3)
The length of time specified by the
timeout
member has elapsed before the user agent could successfully
acquire a position
MDN
GeolocationPositionError/code
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
16+
Opera Android
16+
Safari
5+
Safari iOS
4.2+
Samsung Internet
1.0+
WebView Android
37+
9.2
code
attribute
The
code
attribute returns the value it was
initialized to
(see
9.1
Constants
for possible
values).
MDN
GeolocationPositionError/message
This feature is in all major engines.
Chrome
5+
Chrome Android
18+
Edge
12+
Edge Mobile
Firefox
3.5+
Firefox Android
4+
Internet Explorer
9+
Opera
16+
Opera Android
16+
Safari
5+
Safari iOS
4.2+
Samsung Internet
1.0+
WebView Android
37+
9.3
message
attribute
The
message
attribute is a developer-friendly textual
description of the
code
attribute.
Note
: Don't show .message to users!
The purpose of
GeolocationPositionError
's
message
attribute is to assist
developers with debugging. For legacy reasons, this attribute does
not supply language or base direction metadata and is only
localized into English. Developers are advised to use
GeolocationPositionError
's
code
attribute to create a localized experience.
10.
Permissions policy
The
Geolocation API
defines a
policy-controlled feature
identified by the string
"geolocation"
. Its
default allowlist
is
'self'
11.
Conformance
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words
MAY
MUST
RECOMMENDED
, and
SHOULD
in this document
are to be interpreted as described in
BCP 14
RFC2119
] [
RFC8174
when, and only when, they appear in all capitals, as shown here.
A.
IDL Index
WebIDL
partial interface
Navigator
SameObject
] readonly attribute
Geolocation
geolocation
};
Exposed
Window
interface
Geolocation
undefined
getCurrentPosition
PositionCallback
successCallback
optional
PositionErrorCallback
errorCallback
= null,
optional
PositionOptions
options
= {}
);
long
watchPosition
PositionCallback
successCallback
optional
PositionErrorCallback
errorCallback
= null,
optional
PositionOptions
options
= {}
);
undefined
clearWatch
long
watchId
);
};
callback
PositionCallback
undefined
GeolocationPosition
position
);
callback
PositionErrorCallback
undefined
GeolocationPositionError
positionError
);
dictionary
PositionOptions
boolean
enableHighAccuracy
= false;
Clamp
unsigned long
timeout
= 0xFFFFFFFF;
Clamp
unsigned long
maximumAge
= 0;
};
Exposed
Window
SecureContext
interface
GeolocationPosition
readonly attribute
GeolocationCoordinates
coords
readonly attribute
EpochTimeStamp
timestamp
};
Exposed
Window
SecureContext
interface
GeolocationCoordinates
readonly attribute
double
accuracy
readonly attribute
double
latitude
readonly attribute
double
longitude
readonly attribute
double
altitude
readonly attribute
double
altitudeAccuracy
readonly attribute
double
heading
readonly attribute
double
speed
};
Exposed
Window
interface
GeolocationPositionError
const
unsigned short
PERMISSION_DENIED
= 1;
const
unsigned short
POSITION_UNAVAILABLE
= 2;
const
unsigned short
TIMEOUT
= 3;
readonly attribute
unsigned short
code
readonly attribute
DOMString
message
};
B.
Index
B.1
Terms defined by this specification
A new GeolocationPosition
§8.5
accuracy
attribute for
GeolocationCoordinates
§8.1
Acquire position
§5.5
altitude
attribute for
GeolocationCoordinates
§8.2
altitudeAccuracy
attribute for
GeolocationCoordinates
§8.2
[[cachedPosition]]
internal slot for
Geolocation
§5.1
call back with error
§5.7
check permission
§5.6
clearWatch()
method for
Geolocation
§5.4
code
attribute for
GeolocationPositionError
§9.2
coords
attribute for
GeolocationPosition
§7.1
enableHighAccuracy
member for
PositionOptions
§6.1
geolocation
attribute for
Navigator
§4.
Geolocation
interface
§5.
geolocation task source
§7.4
"geolocation"
§10.
GeolocationCoordinates
interface
§8.
GeolocationPosition
interface
§7.
GeolocationPositionError
interface
§9.
getCurrentPosition
method for
Geolocation
§5.2
heading
attribute for
GeolocationCoordinates
§8.3
[[isHighAccuracy]]
internal slot for
GeolocationPosition
§7.3
latitude
attribute for
GeolocationCoordinates
§8.1
longitude
attribute for
GeolocationCoordinates
§8.1
maximumAge
member for
PositionOptions
§6.3
message
attribute for
GeolocationPositionError
§9.3
PERMISSION_DENIED
§9.1
POSITION_UNAVAILABLE
§9.1
PositionCallback
§5.
PositionErrorCallback
§5.
PositionOptions
dictionary
§6.
Request position
§5.5
speed
attribute for
GeolocationCoordinates
§8.4
timeout
member for
PositionOptions
§6.2
TIMEOUT
§9.1
timestamp
attribute for
GeolocationPosition
§7.2
watchPosition
method for
Geolocation
§5.3
[[watchTasks]]
internal slot for
Geolocation
§5.1
B.2
Terms defined by reference
HR-TIME
] defines the following:
EpochTimeStamp
HTML
] defines the following:
allow
attribute (for
iframe
element)
associated Document
current settings object
environment settings object
fully active (for
Document
iframe
element
in parallel
list of active timers
navigates
Navigator
interface
non-secure context
origin
page visibility change steps
Queue a global task
Queue a task
realm (for environment settings object)
relevant global object
task
task source
visibility state (for
Document
Window
interface
INFRA
] defines the following:
Append (for
set
contain (for
list
exists (for
map
implementation-defined
item (for
list
remove (for
map
Remove (for
list
set
PERMISSIONS
] defines the following:
default powerful feature
denied
(for
PermissionState
express permission
grants (for
permission
lifetimes (for
permission
permission
permission state
Permissions
powerful feature
request permission to use
PERMISSIONS-POLICY
] defines the following:
default allowlist
Permissions Policy
policy-controlled feature
WEBIDL
] defines the following:
boolean
type
[Clamp]
extended attribute
DOMString
interface
double
type
[Exposed]
extended attribute
invokes
long
type
[SameObject]
extended attribute
[SecureContext]
extended attribute
this
undefined
type
unsigned long
type
unsigned short
type
C.
Acknowledgments
This section is non-normative.
This specification builds upon earlier work in the industry, including
research by Aza Raskin, Google Gears Geolocation API, and
LocationAware.org.
Thanks also to Alec Berntson, Alissa Cooper, Steve Block, Greg
Bolsinga, Lars Erik Bolstad, Aaron Boodman, Dave Burke, Chris Butler,
Max Froumentin, Shyam Habarakada, Marcin Hanclik, Ian Hickson, Brad
Lassey, Angel Machin, Cameron McCormack, Daniel Park, Stuart Parmenter,
Olli Pettay, Chris Prince, Arun Ranganathan, Carl Reed, Thomas
Roessler, Dirk Segers, Allan Thomson, Martin Thomson, Doug Turner, Erik
Wilde, Matt Womer, and Mohamed Zergaoui.
D.
References
D.1
Normative references
[hr-time]
High Resolution Time
. Yoav Weiss; Ilya Grigorik; James Simonsen; Jatinder Mann. W3C. 12 October 2021. W3C Working Draft. URL:
[HTML]
HTML Standard
. Anne van Kesteren; Domenic Denicola; Ian Hickson; Philip Jägenstedt; Simon Pieters. WHATWG. Living Standard. URL:
[infra]
Infra Standard
. Anne van Kesteren; Domenic Denicola. WHATWG. Living Standard. URL:
[Permissions]
Permissions
. Marcos Caceres; Mike Taylor. W3C. 23 November 2021. W3C Working Draft. URL:
[Permissions-Policy]
Permissions Policy
. Ian Clelland. W3C. 16 July 2020. W3C Working Draft. URL:
[RFC2119]
Key words for use in RFCs to Indicate Requirement Levels
. S. Bradner. IETF. March 1997. Best Current Practice. URL:
[RFC8174]
Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words
. B. Leiba. IETF. May 2017. Best Current Practice. URL:
[WebIDL]
Web IDL Standard
. Edgar Chen; Timothy Gu. WHATWG. Living Standard. URL:
[WGS84]
National Imagery and Mapping Agency Technical Report 8350.2, Third Edition
. National Imagery and Mapping Agency. 3 January 2000.
Permalink
exported
Referenced in:
Not referenced in this document.
Permalink
exported
Referenced in:
§ 4. Extensions to the Navigator interface
§ 5.1 Internal slots
§ A. IDL Index
Permalink
exported
Referenced in:
§ 5. Geolocation interface and callbacks
(2)
§ 5.5 Request position
§ 7.4 Task sources
§ A. IDL Index
(2)
Permalink
exported
Referenced in:
§ 5. Geolocation interface and callbacks
(2)
§ 5.5 Request position
§ 5.6 Check permission
§ 5.7 Call back with error
§ 7.4 Task sources
§ A. IDL Index
(2)
Permalink
Referenced in:
§ 5.1 Internal slots
§ 5.5 Request position
(2)
Permalink
Referenced in:
§ 5.4 clearWatch() method
(2)
§ 5.5 Request position
Permalink
exported
IDL
Referenced in:
§ 1. Introduction
§ 2.4 Handling errors
§ 3.1 User consent
§ 5. Geolocation interface and callbacks
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 1. Introduction
§ 2.4 Handling errors
§ 3.1 User consent
§ 5. Geolocation interface and callbacks
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 2.3 Stop watching a position
§ 5. Geolocation interface and callbacks
§ A. IDL Index
Permalink
Referenced in:
§ 1.2 Change log
§ 5.2 getCurrentPosition() method
§ 5.3 watchPosition() method
§ 5.5 Request position
§ 7.4 Task sources
§ 9.1 Constants
Permalink
Referenced in:
§ 1. Introduction
§ 1.2 Change log
§ 2.6 Using timeout
§ 6.2 timeout member
(2)
§ 9.1 Constants
(2)
Permalink
Referenced in:
§ 1. Introduction
§ 3.1 User consent
§ 5.5 Request position
§ 6.2 timeout member
Permalink
Referenced in:
§ 5.2 getCurrentPosition() method
§ 5.3 watchPosition() method
§ 5.5 Request position
(2)
(3)
(4)
§ 5.6 Check permission
§ 9.2 code attribute
Permalink
exported
IDL
Referenced in:
§ 1. Introduction
§ 2.6 Using timeout
§ 5. Geolocation interface and callbacks
(2)
§ 5.5 Request position
§ 6. PositionOptions dictionary
§ A. IDL Index
(2)
(3)
Permalink
exported
IDL
Referenced in:
§ 1. Introduction
§ 5.5 Request position
(2)
(3)
§ 6. PositionOptions dictionary
§ 7.3 Internal slots
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 2.6 Using timeout
§ 5.5 Request position
(2)
§ 6. PositionOptions dictionary
§ 6.2 timeout member
(2)
§ 9.1 Constants
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 1. Introduction
§ 5.5 Request position
(2)
§ 6. PositionOptions dictionary
§ A. IDL Index
Permalink
exported
Referenced in:
§ 1. Introduction
§ 5. Geolocation interface and callbacks
§ 5.1 Internal slots
§ 7.3 Internal slots
§ 8.5 Constructing a GeolocationPosition
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 7. GeolocationPosition interface
§ 8.5 Constructing a GeolocationPosition
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 5.5 Request position
§ 7. GeolocationPosition interface
§ 8.5 Constructing a GeolocationPosition
§ A. IDL Index
Permalink
Referenced in:
§ 5.5 Request position
§ 8.5 Constructing a GeolocationPosition
Permalink
Referenced in:
§ 5.5 Request position
(2)
(3)
§ 5.7 Call back with error
Permalink
exported
IDL
Referenced in:
§ 7. GeolocationPosition interface
§ 8. GeolocationCoordinates interface
§ 8.5 Constructing a GeolocationPosition
§ A. IDL Index
(2)
Permalink
exported
IDL
Referenced in:
§ 8. GeolocationCoordinates interface
§ 8.5 Constructing a GeolocationPosition
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 8. GeolocationCoordinates interface
§ 8.5 Constructing a GeolocationPosition
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 8. GeolocationCoordinates interface
§ 8.5 Constructing a GeolocationPosition
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 8. GeolocationCoordinates interface
§ 8.5 Constructing a GeolocationPosition
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 8. GeolocationCoordinates interface
§ 8.5 Constructing a GeolocationPosition
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 8. GeolocationCoordinates interface
§ 8.5 Constructing a GeolocationPosition
(2)
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 8. GeolocationCoordinates interface
§ 8.5 Constructing a GeolocationPosition
(2)
§ A. IDL Index
Permalink
Referenced in:
§ 5.5 Request position
§ 7.3 Internal slots
Permalink
exported
IDL
Referenced in:
§ 1. Introduction
§ 2.4 Handling errors
§ 5. Geolocation interface and callbacks
§ 5.7 Call back with error
§ 7.3 Internal slots
§ 9. GeolocationPositionError interface
§ 9.3 message attribute
(2)
§ A. IDL Index
(2)
Permalink
exported
IDL
Referenced in:
§ 5.5 Request position
(2)
§ 5.6 Check permission
§ 9. GeolocationPositionError interface
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 5.2 getCurrentPosition() method
§ 5.3 watchPosition() method
§ 5.5 Request position
§ 9. GeolocationPositionError interface
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 5.5 Request position
§ 9. GeolocationPositionError interface
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 5.7 Call back with error
§ 9. GeolocationPositionError interface
§ 9.3 message attribute
(2)
§ A. IDL Index
Permalink
exported
IDL
Referenced in:
§ 9. GeolocationPositionError interface
§ 9.3 message attribute
§ A. IDL Index
Permalink
Referenced in:
Not referenced in this document.
Permalink
Referenced in:
§ 5.5 Request position
§ 7. GeolocationPosition interface
§ 8.5 Constructing a GeolocationPosition
§ A. IDL Index
Permalink
Referenced in:
§ 2.7 Enabling the API in third-party contexts
Permalink
Referenced in:
§ 5.2 getCurrentPosition() method
§ 5.3 watchPosition() method
§ 5.5 Request position
Permalink
Referenced in:
§ 5.2 getCurrentPosition() method
§ 5.3 watchPosition() method
§ 5.5 Request position
Permalink
Referenced in:
§ 5.5 Request position
Permalink
Referenced in:
§ 5.2 getCurrentPosition() method
§ 5.3 watchPosition() method
§ 5.5 Request position
Permalink
Referenced in:
§ 2.7 Enabling the API in third-party contexts
§ 5.5 Request position
Permalink
Referenced in:
§ 5.5 Request position
Permalink
Referenced in:
§ 5.5 Request position
(2)
(3)
Permalink
Referenced in:
§ 5.6 Check permission
Permalink
Referenced in:
§ 4. Extensions to the Navigator interface
§ A. IDL Index
Permalink
Referenced in:
§ 5.5 Request position
Permalink
Referenced in:
§ 5.6 Check permission
Permalink
Referenced in:
§ 5.5 Request position
Permalink
Referenced in:
§ 5.5 Request position
Permalink
Referenced in:
§ 5.5 Request position
(2)
§ 5.7 Call back with error
Permalink
Referenced in:
§ 5.6 Check permission
Permalink
Referenced in:
§ 5.5 Request position
Permalink
Referenced in:
§ 5.1 Internal slots
§ 5.5 Request position
Permalink
Referenced in:
§ 7.4 Task sources
Permalink
Referenced in:
§ 5.5 Request position
(2)
(3)
Permalink
Referenced in:
§ 5. Geolocation interface and callbacks
§ 7. GeolocationPosition interface
§ 8. GeolocationCoordinates interface
§ 9. GeolocationPositionError interface
§ A. IDL Index
(2)
(3)
(4)
Permalink
Referenced in:
§ 5.5 Request position
Permalink
Referenced in:
§ 5.5 Request position
Permalink
Referenced in:
§ 5.4 clearWatch() method
Permalink
Referenced in:
§ 5.5 Request position
(2)
Permalink
Referenced in:
§ 5.1 Internal slots
Permalink
Referenced in:
§ 5.4 clearWatch() method
Permalink
Referenced in:
§ 5.5 Request position
(2)
(3)
Permalink
Referenced in:
§ 5.1 Internal slots
Permalink
Referenced in:
§ 5.6 Check permission
Permalink
Referenced in:
§ 5.6 Check permission
Permalink
Referenced in:
§ 3.1 User consent
(2)
Permalink
Referenced in:
§ 3.1 User consent
§ 5.5 Request position
Permalink
Referenced in:
§ 3.1 User consent
(2)
(3)
(4)
§ 5.6 Check permission
(2)
Permalink
Referenced in:
§ 5.6 Check permission
(2)
Permalink
Referenced in:
§ 3.1 User consent
Permalink
Referenced in:
§ 1.2 Change log
§ D.1 Normative references
(2)
Permalink
Referenced in:
§ 3.1 User consent
Permalink
Referenced in:
§ 5.6 Check permission
Permalink
Referenced in:
§ 2.7 Enabling the API in third-party contexts
§ 10. Permissions policy
Permalink
Referenced in:
§ 1.2 Change log
§ 2.7 Enabling the API in third-party contexts
§ D.1 Normative references
(2)
Permalink
Referenced in:
§ 10. Permissions policy
Permalink
Referenced in:
§ 5.5 Request position
§ 6. PositionOptions dictionary
§ 7.3 Internal slots
§ A. IDL Index
Permalink
Referenced in:
§ 6. PositionOptions dictionary
(2)
§ A. IDL Index
(2)
Permalink
Referenced in:
§ 9. GeolocationPositionError interface
§ A. IDL Index
Permalink
Referenced in:
§ 8. GeolocationCoordinates interface
(2)
(3)
(4)
(5)
(6)
(7)
§ A. IDL Index
(2)
(3)
(4)
(5)
(6)
(7)
Permalink
Referenced in:
§ 5. Geolocation interface and callbacks
§ 7. GeolocationPosition interface
§ 8. GeolocationCoordinates interface
§ 9. GeolocationPositionError interface
§ A. IDL Index
(2)
(3)
(4)
Permalink
Referenced in:
§ 5.5 Request position
(2)
§ 5.7 Call back with error
Permalink
Referenced in:
§ 5. Geolocation interface and callbacks
(2)
§ 5.5 Request position
§ A. IDL Index
(2)
Permalink
Referenced in:
§ 4. Extensions to the Navigator interface
§ A. IDL Index
Permalink
Referenced in:
§ 7. GeolocationPosition interface
§ 8. GeolocationCoordinates interface
§ A. IDL Index
(2)
Permalink
Referenced in:
§ 5.4 clearWatch() method
(2)
§ 5.5 Request position
(2)
(3)
(4)
Permalink
Referenced in:
§ 5. Geolocation interface and callbacks
(2)
(3)
(4)
§ A. IDL Index
(2)
(3)
(4)
Permalink
Referenced in:
§ 5.1 Internal slots
§ 6. PositionOptions dictionary
(2)
§ A. IDL Index
(2)
Permalink
Referenced in:
§ 5.7 Call back with error
§ 9. GeolocationPositionError interface
(2)
(3)
(4)
§ A. IDL Index
(2)
(3)
(4)
US