You can use pusher-js in a Service Worker and you can use the Notification API to display messages. This blog post uses pusher-js in a Service Worker and there is a GitHub repo linked. However, it isn't possible to receive messages using Pusher while the web worker isn't running (e.g. no app tabs open). To do that, you would probably need to make use of the Push API.
Haven't found what you were looking for?Submit a ticket