From 1e2c5f36c5f699b6d9f22f5c115c963a8c573885 Mon Sep 17 00:00:00 2001 From: Nidhi Jaju Date: Tue, 15 Mar 2022 07:01:54 +0000 Subject: [PATCH] update with abort reason --- index.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.bs b/index.bs index b64bcf1..f59776e 100644 --- a/index.bs +++ b/index.bs @@ -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 aborted flag is set, then reject |p| with an "{{AbortError!!exception}}" {{DOMException}} and return |p|. + 1. If |signal| is aborted, then reject |p| with |signal|'s abort reason and return |p|. 1. Let |geo| be the result of invoking construct a Geolocation Sensor object 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 add the following abort steps 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 abort reason and abort these steps. 1. Run these steps in parallel: 1. If notify error is invoked with |geo|, invoke |geo|.{{Sensor/stop()}}, and reject |p| with the {{DOMException}} passed as input to notify error. 1. If notify new reading is invoked with |geo|, then resolve a geolocation promise with |geo| and |p|.