Re: Input needed: Cancelling a permission request?

On 26/02/15 12:43, Anne van Kesteren wrote:
> On Thu, Feb 26, 2015 at 12:33 PM, Stefan Håkansson LK
> <stefan.lk.hakansson@ericsson.com> wrote:
>> What is supposed to happen if you do:
>>
>> var p = navigator.mediaDevices.getUserMedia(options);
>>
>> followed by
>>
>> p.constructor.reject();
>
> There's no public way to reject p. Promise.reject() is a static method
> to create an instance of a rejected promise.

OK. I was fooled by experimenting in the console of a couple of 
browsers. It (i.e. reject a Promise by calling constructor.reject) 
seemed to work there: no warnings and one even prints out a new status 
"rejected" for the Promise. (A third browser warns.)

At closer inspection it turns out that the Promise remains "pending" in 
all cases.

Received on Thursday, 26 February 2015 12:07:45 UTC