Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update with DOM's abort reason #53

Merged
merged 1 commit into from
Mar 16, 2022
Merged
Changes from all commits
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
4 changes: 2 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ The {{GeolocationSensor/read()}} method, when called, must run the following alg
1. Let |p| be a new promise.
1. Let |options| be the first argument.
1. Let |signal| be the |options|' dictionary member of the same name if present, or null otherwise.
1. If |signal|'s <a>aborted flag</a> is set, then reject |p| with an "{{AbortError!!exception}}" {{DOMException}} and return |p|.
1. If |signal| is <a>aborted</a>, then reject |p| with |signal|'s <a>abort reason</a> and return |p|.
1. Let |geo| be the result of invoking <a>construct a Geolocation Sensor object</a> with |options|. If this throws a {{DOMException}}, catch it, reject |p| with that {{DOMException}}, and return |p|.
1. Invoke |geo|.{{Sensor/start()}}.
1. If |signal| is not null, then <a>add the following abort steps</a> to |signal|:
1. Invoke |geo|.{{Sensor/stop()}}.
1. Reject |p| with an "{{AbortError!!exception}}" {{DOMException}} and abort these steps.
1. Reject |p| with |signal|'s <a>abort reason</a> and abort these steps.
1. Run these steps <a>in parallel</a>:
1. If <a>notify error</a> is invoked with |geo|, invoke |geo|.{{Sensor/stop()}}, and reject |p| with the {{DOMException}} passed as input to <a>notify error</a>.
1. If <a>notify new reading</a> is invoked with |geo|, then <a>resolve a geolocation promise</a> with |geo| and |p|.
Expand Down