On Tue, Aug 25, 2015 at 11:06 AM, Mounir Lamouri <mou...@lamouri.fr> wrote:
> Browsers internal implementation can change. The API will have to stay
> as it is in the long run. It's better to have an flexible API that would
> allow different implementation strategies.

Even if you have only strings today, there's several ways you could
imagine changing that in the future if the need indeed arises. We've
learned long ago that we shouldn't ship complicated frameworks where a
simple API would do.


> This isn't working for some APIs. For example, MIDI has a very basic
> navigator.requestMIDIAccess(). Should we start having
> navigator.queryMidiAccess()?

Sure, or navigator.midiPermission().


>> 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.
>
> This is something that is already doable. If a webpage calls
> navigator.geolocation.getCurrentPosition(), it doesn't need to do
> anything with the position (this can apply to roughly any API). The
> Notififcations API has an explicit call for requesting too.

The Notifications API is a special case as is noted in its
specification. It's one of the few cases where we decided this was
acceptable.


> Furthermore,
> allowing requests will open some new possibilities like requesting a
> 'paste' permission which can't be done today.

If we do indeed need that we could add an API for it. But we should
first carefully consider if another approach is not better.


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

Reply via email to