Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move emulated position data after permission check
  • Loading branch information
sadym-chromium committed Mar 31, 2025
commit 2608ee6a03fdd5a35a950542f7ceb57658f38f36
64 changes: 32 additions & 32 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -802,38 +802,6 @@ <h2>
<li>Let |acquisitionTime:EpochTimeStamp| be a new {{EpochTimeStamp}}
that represents now.
</li>
<li>
<ins cite="#a4"> Check if the emulated position data should be used by running
the following steps:
<ol>
<li>Let |emulatedPositionData| be [=get emulated position data=]
passing [=this=].
</li>
<li>If |emulatedPositionData| is not null:
<ol>
<li>If |emulatedPositionData| is a {{GeolocationPositionError}}:
<ol>
<li>[=Call back with error=] passing |errorCallback| and
|emulatedPositionData|.
</li>
<li>Terminate this algorithm.</li>
</ol>
</li>
<li>Let |position| be [=a new `GeolocationPosition`=]
passing |emulatedPositionData|, |acquisitionTime| and
|options|.{{PositionOptions/enableHighAccuracy}}.
</li>
<li>[=Queue a task=] on the [=geolocation task source=] with
a step that [=invokes=] |successCallback| with
« |position| » and "`report`".
</li>
<li>Terminate this algorithm.
</li>
</ol>
</li>
</ol>
</ins>
</li>
<li>Let |timeoutTime| be the sum of |acquisitionTime| and
|options|.{{PositionOptions/timeout}}.
</li>
Expand All @@ -858,6 +826,38 @@ <h2>
</li>
<li>If |permission| is "granted":
<ol>
<li>
<ins cite="#a4"> Check if the emulated position data should be used by running
the following steps:
<ol>
<li>Let |emulatedPositionData| be [=get emulated position data=]
passing [=this=].
</li>
<li>If |emulatedPositionData| is not null:
<ol>
<li>If |emulatedPositionData| is a {{GeolocationPositionError}}:
<ol>
<li>[=Call back with error=] passing |errorCallback| and
|emulatedPositionData|.
</li>
<li>Terminate this algorithm.</li>
</ol>
</li>
<li>Let |position| be [=a new `GeolocationPosition`=]
passing |emulatedPositionData|, |acquisitionTime| and
|options|.{{PositionOptions/enableHighAccuracy}}.
</li>
<li>[=Queue a task=] on the [=geolocation task source=] with
a step that [=invokes=] |successCallback| with
« |position| » and "`report`".
</li>
<li>Terminate this algorithm.
</li>
</ol>
</li>
</ol>
</ins>
</li>
<li>Let |position| be null.
</li>
<li>If |cachedPosition| is not null, and
Expand Down