@@ -182,6 +182,8 @@ spec: GEOMETRY; urlPrefix: https://drafts.fxtf.org/geometry/
182
182
text: height dimension; url: rectangle-height-dimension
183
183
spec: GEOLOCATION; urlPrefix: https://www.w3.org/TR/geolocation/
184
184
type: dfn
185
+ text: GeolocationPositionError; url: #dom-geolocationpositionerror
186
+ text: POSITION_UNAVAILABLE; url: #dom-geolocationpositionerror-position_unavailable
185
187
text: set emulated position data; url: #dfn-set-emulated-position-data
186
188
spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/
187
189
type: dfn
@@ -5623,7 +5625,10 @@ The <dfn export for=commands>emulation.setGeolocationOverride</dfn> command modi
5623
5625
)
5624
5626
5625
5627
emulation.SetGeolocationOverrideParameters = {
5626
- coordinates: emulation.GeolocationCoordinates / null,
5628
+ (
5629
+ (coordinates: emulation.GeolocationCoordinates / null) //
5630
+ (error: emulation.GeolocationPositionError)
5631
+ ),
5627
5632
? contexts: [+browsingContext.BrowsingContext] ,
5628
5633
? userContexts: [+browser.UserContext] ,
5629
5634
}
@@ -5637,6 +5642,10 @@ The <dfn export for=commands>emulation.setGeolocationOverride</dfn> command modi
5637
5642
? heading: (0.0...360.0) / null .default null,
5638
5643
? speed: (float .ge 0.0) / null .default null,
5639
5644
}
5645
+
5646
+ emulation.GeolocationPositionError = {
5647
+ type: "positionUnavailable"
5648
+ }
5640
5649
</pre>
5641
5650
</dd>
5642
5651
<dt> Result Type</dt>
@@ -5651,9 +5660,26 @@ The <dfn export for=commands>emulation.setGeolocationOverride</dfn> command modi
5651
5660
5652
5661
The [=remote end steps=] with |command parameters| are:
5653
5662
5654
- 1. If |command parameters| [=map/contains=] "<code> altitudeAccuracy</code> "
5655
- and |command parameters| doesn't [=map/contain=] "<code> altitude</code> ",
5656
- return [=error=] with [=error code=] [=invalid argument=] .
5663
+ 1. If |command parameters| [=map/contains=] "<code> coordinates</code> " and
5664
+ |command parameters|["<code>coordinates</code>"] [=map/contains=]
5665
+ "<code> altitudeAccuracy</code> " and
5666
+ |command parameters|["<code>coordinates</code>"] doesn't [=map/contain=]
5667
+ "<code> altitude</code> ", return [=error=] with [=error code=]
5668
+ [=invalid argument=] .
5669
+
5670
+ 1. If |command parameters| [=map/contains=] "<code> error</code> ":
5671
+
5672
+ 1. Assert |command parameters|["<code>error</code>"]["<code>type</code>"] equals
5673
+ "<code> positionUnavailable</code> ".
5674
+
5675
+ 1. Let |emulated position data| be a [=/map=] matching [=GeolocationPositionError=]
5676
+ production, with <code> code</code> field set to [=POSITION_UNAVAILABLE=] and
5677
+ <code> message</code> field set to the empty string.
5678
+
5679
+ Note: <code> message</code> will be ignored by implementation according to the geolocation spec.
5680
+
5681
+ 1. Otherwise, let |emulated position data| be
5682
+ |command parameters|["<code>coordinates</code>"] .
5657
5683
5658
5684
1. If |command parameters| [=map/contains=] "<code> userContexts</code> "
5659
5685
and |command parameters| [=map/contains=] "<code> context</code> ",
@@ -5675,7 +5701,7 @@ The [=remote end steps=] with |command parameters| are:
5675
5701
5676
5702
1. For each |user context| of |user contexts|:
5677
5703
5678
- 1. [=map/Set=] [=geolocation overrides map=] [|user context|] to |command parameters| ["<code>coordinates</code>"] .
5704
+ 1. [=map/Set=] [=geolocation overrides map=] [|user context|] to |emulated position data| .
5679
5705
5680
5706
1. [=list/For each=] |top-level traversable| of the list of all [=/top-level traversables=]
5681
5707
whose [=associated user context=] is |user context|:
@@ -5684,7 +5710,7 @@ The [=remote end steps=] with |command parameters| are:
5684
5710
5685
5711
1. For each |navigable| of |navigables|:
5686
5712
5687
- 1. [=Set emulated position data=] with |navigable| and |command parameters| ["<code>coordinates</code>"] .
5713
+ 1. [=Set emulated position data=] with |navigable| and |emulated position data| .
5688
5714
5689
5715
1. Return [=success=] with data null.
5690
5716
0 commit comments