Re: Progress on Push API

Thank you for these notes, Eduardo!

On Tue, Apr 29, 2014 at 11:21 AM, Anne van Kesteren <annevk@annevk.nl>wrote:

> On Tue, Apr 29, 2014 at 10:00 AM, EDUARDO FULLEA CARRERA <efc@tid.es>
> wrote:
> > Promise unregister (); as a result of single registration allowed
>
> Why does this have a return value?
>

Dropping a push registration has two aspects to it: (1) removing the
mapping between registration Id and the Service Worker to deliver it to on
the browser side, and (2) removing the registration on the push service.
This way we can communicate whether that has succeeded, and the
registration Id known to the site's application server has been invalidated.

That said, an alternative would be to say that the UA would do a best
effort to drop the registration at the earliest option (e.g. when the user
is offline), allowing the developer to assume it succeeded.

> Promise<enumeration> hasPermission ();enumeration: Granted, Denied,
> Default (or NeedToAsk)
>
> I think this can be synchronous and done similarly to
> http://notifications.spec.whatwg.org/#permission


Checking whether the site has permission to use feature X is an
asynchronous operation in many browsers. In fact, I'd prefer if the
Notification specification would be updated to replace the permission
property with a hasPermission method as well.

Thanks,
Peter


> > a new DOMError
>
> DOMError is dead, use DOMException.
>
>
> --
> http://annevankesteren.nl/
>
>

Received on Tuesday, 29 April 2014 12:17:32 UTC