Confirmed users
93
edits
Line 1: | Line 1: | ||
<h2> Client Side API </h2> | |||
<pre> | <pre> | ||
Line 6: | Line 6: | ||
}; | }; | ||
interface PushNotification : EventTarget { | interface PushNotification : EventTarget { | ||
// registers to receive push notifications for a given topic | // registers to receive push notifications for a given topic | ||
// DOMRequest.result is a PushRegistration in case of success | |||
DOMRequest register(DOMString topic); | DOMRequest register(DOMString topic); | ||
// registers to stop receiving push notifications for a given topic | // registers to stop receiving push notifications for a given topic | ||
// DOMRequest.result is a PushRegistration in case of success | |||
DOMRequest unregister(DOMString topic); | DOMRequest unregister(DOMString topic); | ||
// returns the list of all push registrations for this origin | // returns the list of all push registrations for this origin | ||
PushRegistration[] registered(); | |||
// event MUST be of type PushEvent | // event MUST be of type PushEvent | ||
Line 36: | Line 38: | ||
DOMString pushRequestID; | DOMString pushRequestID; | ||
}; | }; | ||