- From: Eric Rescorla <ekr@rtfm.com>
- Date: Mon, 27 Apr 2015 07:04:36 -0700
- To: Harald Alvestrand <harald@alvestrand.no>
- Cc: Jan-Ivar Bruaroey <jib@mozilla.com>, "public-media-capture@w3.org" <public-media-capture@w3.org>
- Message-ID: <CABcZeBP5OuQAX7VtokZVLQ1s_q+yR8KNTtDppOnrnO+bwZSB7Q@mail.gmail.com>
On Mon, Apr 27, 2015 at 6:53 AM, Harald Alvestrand <harald@alvestrand.no> wrote: > 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? > Well, I think it depends if you expect promises to eventually be cancellable. If you do, then we can just publish 1.0 and wait. > 2) If "yes", does cancelOutstandingRequests seem like a good idea? > No. -Ekr
Received on Monday, 27 April 2015 14:05:45 UTC