Push API - use parameterized Promise types

In WebIDL we can now use parameterized Promise types:
http://heycam.github.io/webidl/#idl-promise

My suggestion is that we make some minor changes in the Push API spec to
take advantage of this. It reads much better and the prose can be
simplified.

The following promise types:

interface PushManager {
    Promise register ();
    Promise unregister (DOMString pushRegistrationId);
    Promise registrations ();
};

Can be changed like this:

interface PushManager {
    Promise<PushRegistration> register ();
    Promise<DOMString> unregister (DOMString pushRegistrationId);
    Promise<PushRegistration[]> registrations ();
};

What do you think?

Regards,

Michael

Received on Thursday, 20 March 2014 15:29:24 UTC