Re: [w3c/permissions] Flesh out request("geolocation") (#112)

> "geolocation" is currently specified as a boolean feature, but request() needs to work on browsers like Firefox that let the user grant one location stream but still prompt for the next request in the same realm. That is, request()'s result needs to include a location or a location stream, which means the input needs to include the PositionOptions.

I think we could change Firefox's behavior that if a .request() is made, then you just grant it without needing to ask for it again in the same realm, and for a given origin. 

> I assume we don't want to open up a position stream unless the caller wants it, since watching a location costs more and shows the location indicator for longer than getting a single point. 

Correct, granting permission should not have side effects (i.e., it should not spin up the geolocation, it just says that you are allowed to use the API for this origin - and for this session). 

> We also need to figure out what to do with POSITION_UNAVAILABLE and TIMEOUT. Are they rejected promises or some field in the result?

If we decouple request() from activation of geolocation, we don't need to do anything. 

Then POSITION_UNAVAILABLE and TIMEOUT continue to be handled by watchPosition() and getCurrentPosition(). 


---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/issues/112#issuecomment-238185174

Received on Monday, 8 August 2016 20:43:52 UTC