Readonly
pushObserver topic names, exported for convenience.
Readonly
subscriptionReadonly
subscriptionOptional
aInstancePtr: objectA run time mechanism for interface discovery.
NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.
aInstancePtr must not be null.
[in] A requested interface IID
[out] A pointer to an interface pointer to receive the result.
Retrieves the subscription record associated with the given |(scope, principal)| pair. If the subscription does not exist, the callback will receive |null| as the second argument.
Creates a push subscription for the given |scope| URL and |principal|. If a subscription already exists for this |(scope, principal)| pair, the callback will receive the existing record as the second argument.
The |endpoint| property of the subscription record is a URL string that can be used to send push messages to subscribers.
Each incoming message fires a push-message
observer notification, with
an nsIPushMessage
as the subject and the |scope| as the data.
If the server drops a subscription, a push-subscription-change
observer
will be fired, with the subject set to |principal| and the data set to
|scope|. Servers may drop subscriptions at any time, so callers should
recreate subscriptions if desired.
Creates a restricted push subscription with the given public |key|. The application server must use the corresponding private key to authenticate message delivery requests, as described in draft-thomson-webpush-vapid.
Generated using TypeDoc
A service for components to subscribe and receive push messages from web services. This functionality is exposed to content via the Push DOM API, which uses service workers. This interface exists to support the DOM API, and allows privileged code to receive messages without migrating to service workers.