W3C home > Mailing lists > Public > public-geolocation@w3.org > July 2021

[geolocation-api] Force error when method are called on not fully active docs (#96)

From: Marcos Cáceres via GitHub <sysbot+gh@w3.org>
Date: Mon, 26 Jul 2021 01:38:19 +0000
To: public-geolocation@w3.org
Message-ID: <issues.opened-952419266-1627263497-sysbot+gh@w3.org>
marcoscaceres has just created a new issue for https://github.com/w3c/geolocation-api:

== Force error when method are called on not fully active docs ==
Speaking to @saschanaz, they suggested that `watchPosition()` and `getCurrentPosition()` should invoke the error callbacks if the document is not fully active. 

This makes sense in particular for promise-wrapped code, which would otherwise get stuck.

```JS
// current spec, this doesn't proceed in the odd case where the geo 
// object is from a non-fully active doc. 
await new Promise((res, rej) => geo.getCurrentPosition(res, rej));
```


Please view or discuss this issue at https://github.com/w3c/geolocation-api/issues/96 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 26 July 2021 01:38:21 UTC

This archive was generated by hypermail 2.4.0 : Monday, 26 July 2021 01:38:21 UTC