On Mon, Aug 24, 2015 at 11:57 PM, Anne van Kesteren <ann...@annevk.nl> wrote:
> On Sat, Aug 22, 2015 at 5:03 AM, Birunthan Mohanathas
> <birunt...@mohanathas.com> wrote:
>> Summary: The Permissions API allows a web application to be aware of
>> the status of a given permission, to know whether it is granted,
>> denied or if the user will be asked whether the permission should be
>> granted.
>
> I'm not a big fan of this API.
>
> 1) It doesn't map well to what browsers do internally. Rather than
> simple strings it uses some kind of convoluted dictionary design.

I agree that this is somewhat unfortunate. But in practice it'll mean
that the syntax will be

navigator.permissions.query({ name: "foo" })
rather than
navigator.permissions.query("foo")

which I think in practice is not that big of a problem.

> 2) It would be better to simply expose the permission status of a
> particular feature near a particular feature. If you want to know
> whether geolocation is already granted you should just be able to call
> navigator.geolocation.permission() or some such.

I'm not convinced of this argument. I think this runs the risk of each
API having subtle differences in the querying which IMO is even worse.

Most importantly, I think this API fills a need long asked for by
developers. I.e. while geolocation and similar APIs have taken their
sweet time solving this problem, this API solves the problem here and
now. That's much more valuable than arguing over the exact syntax.

> 3) It seems the API is evolving in ways to also request permission
> without then directly using that permission. It's not clear that is a
> good idea.

I don't see that this risk is higher with a dedicated API compared to
a per-API solution.

But I agree that we should make it clear that we do not intend to
implement a request API.

/ Jonas
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to