- From: Harald Alvestrand <harald@alvestrand.no>
- Date: Mon, 27 Apr 2015 15:53:12 +0200
- To: Jan-Ivar Bruaroey <jib@mozilla.com>, Eric Rescorla <ekr@rtfm.com>
- CC: "public-media-capture@w3.org" <public-media-capture@w3.org>
Den 27. april 2015 14:15, skrev Jan-Ivar Bruaroey: > What happened to "a more general discussion [...] about permissions and > what APIs we should offer around them"? - We seem to have moved on to > where to stick the API (which is irresistible, so I'll jump in). There is a whole shiny new document out: https://w3c.github.io/permissions/ This neatly sidesteps the whole question of how to request a permission you don't have, but does offer a way to query whether a prompt will be displayed if you try to ask for the permission. It also fails to cover the case of access to non-global objects. Still, it's an indication that this discussion is happening elsewhere. > Can we sidestep the whole fetch debate with: > navigator.mediaDevices.cancelOutstandingGumRequests() ? > > Making promises cancellable is a terrible idea, because a promise can be > passed around to several functions without granting control to any of > them. Nevermind that any function acting on said control would affect > all the other ones (action-at-a-distance). Control has to live upstream > in the tree, and it's not for the recipient of a promise to break, > resolve or reject it. > > The only other approach I though had legs was the cancellableToken > (because inputs and outputs: Promise is an output, control should be an > input. As tempting as it is to overload the returned object, it'll muck > up the first wrapper that comes along), especially the promise-version > Martin suggested, but hopefully we wont need such fine control here. So I have two questions, one administrative and one technical: 1) Do we need this to have a viable 1.0 specification? 2) If "yes", does cancelOutstandingRequests seem like a good idea? My personal sense is that this proposal is the one that generates the least amount of conflation with other issues, but it doesn't "feel right" (it has effects that are mediated by global objects when the intended target of the action is a non-global object).
Received on Monday, 27 April 2015 13:53:47 UTC