Closed rubenstolk closed 8 years ago
Or use the permissions api: https://www.chromestatus.com/features/6376494003650560
That's a nice solution but won't solve things fro IE...
Yea, but that's the proper way to do this, then fallback for other browsers.
However, I'm not sure I agree this is an error or should be handled by the element. It's really up to the consumer of this component to implement a timeout (or decide what to do if they user neglects the prompt) if they need it.
Also, don't the geo location API error callbacks get called if the user has denied permission?
This issue is about when the user has neither accepted nor denied permission. I might agree that it should not be handled by the element, on the other hand it makes the element more natural and complete. See https://github.com/ebidel/geo-location/pull/18.
Firefox asks the user to share his location using a popup, that popup can be dismissed. When the user does so, the watchPosition never throws an error. Perhaps we should add a
timeout
handler that fires an error if watchPosition doesn'tsuccess
orerror
?