From 815feda2b67f3f4aa64584e648eaedf92614895c Mon Sep 17 00:00:00 2001
From: Michael van Ouwerkerk
// https://example.com/webapp.js
navigator.serviceWorker.ready.then(function(serviceWorkerRegistration) {
- serviceWorkerRegistration.pushRegistrationManager.register().then(
+ serviceWorkerRegistration.pushManager.register().then(
function(pushRegistration) {
console.log(pushRegistration.registrationId);
console.log(pushRegistration.endpoint);
@@ -419,26 +419,25 @@
- The pushRegistrationManager
- attribute exposes the PushRegistrationManager
for the Service Worker
- identified by the ServiceWorkerRegistration
.
+ The pushManager
+ attribute exposes the PushManager
for the Service Worker identified by
+ the ServiceWorkerRegistration
.
- The PushRegistrationManager interface defines the operations that enable PushManager interface defines the operations that enable webapps to establish access to push services. Note that just a single push registration is allowed per webapp.
-
The register
- method when invoked MUST run the following steps:
+ "widl-PushManager-register-Promise-PushRegistration">register method when
+ invoked MUST run the following steps:
Promise
.
@@ -505,7 +504,7 @@
The getRegistration
+ "widl-PushManager-getRegistration-Promise-PushRegistration">getRegistration
method when invoked MUST run the following steps:
The hasPermission
+ "widl-PushManager-hasPermission-Promise-PushPermissionStatus">hasPermission
method when invoked MUST run the following steps: