messageSW = (data, done) => {
    const messageChannel = new MessageChannel();
    messageChannel.port1.onmessage = (evt) => done(evt.data);
    navigator.serviceWorker.controller.postMessage(data, [
      messageChannel.port2,
    ]);
  }
Sends a mesage to the service worker via postMessage and invokes the
`done()` callback when the service worker responds, with any data value
passed to the event.

@param {Object} data An object to send to the service worker.
@param {Function} done The callback automatically passed via webdriver's
    `executeAsyncScript()` method.