subscribe method
The subscribe()
method of the PushManager
interface 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.
Implementation
external JSPromise<PushSubscription> subscribe(
[PushSubscriptionOptionsInit options]);