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

Reply via email to