W3C home > Mailing lists > Public > public-device-apis-log@w3.org > August 2021

Re: [geolocation-api] Make the API promise compatible (#8)

From: Marcos Cáceres via GitHub <sysbot+gh@w3.org>
Date: Wed, 04 Aug 2021 01:48:14 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-892294549-1628041693-sysbot+gh@w3.org>
Sure, we could tease this out. So, this would only be useful for `.getCurrentPosition()`. 

Potentially, we could just overload: 

Promise<GeolocationPosition> getCurrentPosition(optional PositionOptions options = {});

If that's distinguishable (in the IDL sense), then it wouldn't be too painful to add. 

However, the problem is that `GeolocationPositionError` is not a JS `Error` or `DOMException`, so won't have a stack for if `await` rejects - so that's a deal breaker. 

Now, we could define a new set of DOMExceptions for geo, but then this becomes effectively a big spec rewrite for something that I'm now not sure adds much value. 


GitHub Notification of comment by marcoscaceres
Please view or discuss this issue at https://github.com/w3c/geolocation-api/issues/8#issuecomment-892294549 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 4 August 2021 01:48:16 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:59 UTC