The postMessage() method of the ServiceWorker interface sends a message to the worker.
postMessage()
MDN Reference