Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move pushRegistrationManager to ServiceWorker instance? #2

Closed
efullea opened this issue May 5, 2014 · 3 comments
Closed

Move pushRegistrationManager to ServiceWorker instance? #2

efullea opened this issue May 5, 2014 · 3 comments

Comments

@efullea
Copy link
Contributor

efullea commented May 5, 2014

Issue originally posted by @johnmellor at
telefonicaid/WebAPISpecs#30

See issue and discussion there, but please post new comments here.

@johnmellor
Copy link
Contributor

See discussion on public-webapps and w3c/ServiceWorker/issues/365.

Jake's suggestion (copied below) seems a very clean way of doing this, resolving the earlier concerns:

navigator.serviceWorker.ready.then(function(reg) {
  reg.push.register(...);
});

See also similar background sync issue: WICG/background-sync/issues/6

@mvano
Copy link
Contributor

mvano commented Sep 16, 2014

Just updating John's code sample to the latest syntax:

navigator.serviceWorker.ready.then(function(serviceWorkerRegistration) {
  serviceWorkerRegistration.pushRegistrationManager.register().then(...);
});

efullea pushed a commit that referenced this issue Sep 16, 2014
Push manager. Fixes issue #2
@efullea
Copy link
Contributor Author

efullea commented Sep 16, 2014

Closed by #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants