Re: [whatwg] Notifications: making requestPermission() return a promise

On Wed, Oct 8, 2014 at 7:03 PM, Tab Atkins Jr. <> wrote:
> You keep ignoring the past "turns out we like using async errors for
> 'soft failures' of this kind, and have done it lots of times, and
> nobody seems to complain" argument.

A user saying no to notifications is not an error. You ask the user to
make a decision, the user decides. Either way is a success. An error
would be invoking the method in the wrong way.

> Do you dislike img.onerror firing when the image doesn't load?  (And
> same for all the other resource-loading elements.)

That makes sense. Network errors are rather exceptional. Note that it
does not error for a 404 (unless it can't decode the response, which
again, is rather exceptional).

> Do you dislike
> geolocator.getCurrentPosition calling the failure callback when the
> user refuses permission?

I would expect that to be done differently today, yes.


Received on Wednesday, 8 October 2014 17:39:32 UTC