WebAPI/SimplePush: Difference between revisions

Jump to navigation Jump to search
Line 1: Line 1:
== Client Side API ==
<h2> Client Side API </h2>
<pre>
<pre>


Line 6: Line 6:
};
};


interface PushNotification : EventTarget {
interface PushNotification&#160;: 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
   PushRequest[] registered();
   PushRegistration[] registered();


   // event MUST be of type PushEvent
   // event MUST be of type PushEvent
Line 36: Line 38:
   DOMString pushRequestID;
   DOMString pushRequestID;


};
interface PushRegistrationEvent : Event {
  PushRegistration request;
};
};


Confirmed users
93

edits

Navigation menu