title: Service Worker onClick event - Open and pass some data to a PWA
body: <p>I have implemented push notifications for my PWA and my service worker (SW) is currently handling clicks on a notifications like this:</p>
  <ol>
  <li>If the app is running it will put it in the foreground and send it some data using the <code>Client.postMessage</code> API</li>
  <li>If the app is not running it will launch it via <code>Client.openWindow</code> using URL parameters that contain some minimal information about the push notification</li>
  </ol>
  <p>Point 1 works just as I want. But for 2, I would like to be able to send to my app the same data as for 1, and I cannot add it to the URL (the payload is too large). The issue is that I can only use <code>Client.postMessage</code> when my app is ready to receive such messages...</p>
  <p>What is the simplest way to do that?</p>
  <p>Note: my use case is a chat app for which a push notification is displayed when a message is received and a click on the notification triggers the app and shows the corresponding chat and message. I want to pass the content of the message itself (which is in the push notification received by the service worker) to the app so it can show directly, instead of having to pull it from the backend.</p>