PostMessage from serviceWorker after push event

I need to send a message from a serviceWorker to a page after a push event. I am unable to specify the port property (e.g. ) because I did not post this post

This code does not work (maybe I am doing something wrong)'fsdfasf');



source to share

1 answer

Following the specs , what appears to be the correct implementation is picking Client

from Worker Worker and then using a postMessage

method like:

onmessage = function(event){




All Articles