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

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