PushManager
js.html.push.PushManager (extern class)
The PushManager
interface of the Push API provides a way to receive notifications from third-party servers as well as request URLs for push notifications.
Documentation PushManager by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
Instance Members
Subscribes to a push service. It returns a Promise
that resolves to a PushSubscription
object containing details of a push subscription. A new push subscription is created if the current service worker does not have an existing subscription.
Retrieves an existing push subscription. It returns a Promise
that resolves to a PushSubscription
object containing details of an existing subscription. If no existing subscription exists, this resolves to a null
value.
Returns a Promise
that resolves to the permission state of the current PushManager
, which will be one of 'granted'
, 'denied'
, or 'prompt'
.