docs: def _send(self, method, **parameters):
          """Sends a message to the front-end and returns a promise."""
          msg = {
              'index': self._calls,
              'method': method,
          }
          msg.update(parameters)
  
          promise = SimplePromise()
          self._callbacks[self._calls] = promise
  
          self._calls += 1
          self._comm.send(msg)
  
          return promise