[push-api] Identifying registrations

The push API currently identifies a registration with a tuple:

interface PushRegistration {
    readonly    attribute DOMString pushEndpoint;
    readonly    attribute DOMString pushRegistrationId;
};

It looks like both are used by the push server.  Local methods seem to
rely on the pushRegistrationId; the remote application server uses the
pushEndpoint, though details are not currently specified [1].

In my experience, the pushEndpoint is a sufficiently unique
identifier.  Contingent on some conclusions on the protocol side, this
could be defined as a URL and used as an identifier.  That single
identifier should suffice.

--Martin

p.s., the register() method on PushManager should be updated to return
Promise<PushRegistration> or Promise<DOMString> as appropriate.

[1] see webpush@ietf.org and related effort there

Received on Monday, 12 May 2014 23:08:37 UTC