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

how to get the registration object after install #61

Closed
knvpk opened this issue Jun 5, 2016 · 3 comments
Closed

how to get the registration object after install #61

knvpk opened this issue Jun 5, 2016 · 3 comments

Comments

@knvpk
Copy link

knvpk commented Jun 5, 2016

Doc says to install service worker use runtime.install(options:Object), but i want the registered reg object so that i will make push manager use of it as specified in the doc https://developers.google.com/web/fundamentals/getting-started/push-notifications/step-06?hl=en , so here how i will get the .then(function(){}) after registering the serviceWorker using the runtime.

@NekR
Copy link
Owner

NekR commented Jun 5, 2016

navigator.serviceWorker.ready.then((reg) => {
  // ....
});

https://developers.google.com/web/updates/2015/03/push-notifications-on-the-open-web

@knvpk
Copy link
Author

knvpk commented Jun 5, 2016

Thanks for that doc.

@knvpk knvpk closed this as completed Jun 5, 2016
@NekR
Copy link
Owner

NekR commented Jun 5, 2016

No problem :-)

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

2 participants