Re: [w3c/permissions] Drop .request() (#83)

With Promises, we can take advantage of the uniform API to write libraries or even [language features](http://tc39.github.io/ecmascript-asyncawait/) that treat a bunch of kinds of Promises generically. With `Permissions.request()`, I don't immediately see that opportunity, especially since different permissions need different extra data in their `request()` calls. Do we have any examples of web developers out in the wild building libraries that abstract permission calls like this?

I do see the benefit of establishing a pattern for request calls to follow. That could be done simply as TAG guidance for new APIs, plus an attempt to retrofit it onto older APIs like [geolocation](https://github.com/w3ctag/spec-reviews/blob/master/2015/03/Permissions.md#requesting-the-geolocation-permission) and [notifications](https://github.com/w3ctag/spec-reviews/blob/master/2015/03/Permissions.md#requesting-the-notification-permission). It sounds like that's the path @jan-ivar and @martinthomson want to take. However, a new API gives an easier place to do that retrofit and makes it harder to miss the TAG guidance in the spec for a new permission.

---
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/83#issuecomment-212170382

Received on Tuesday, 19 April 2016 23:29:42 UTC