onProtocolEvent = (method, params) => {
      // Cast because tsc 4.7 still can't quite track the dependent parameters.
      const payload = /** @type {LH.Protocol.RawEventMessage} */ (
        {method, params, targetType, sessionId});
      this.emit('protocolevent', payload);
    }
@template {keyof LH.Protocol.RawEventMessageRecord} EventName
@param {EventName} method
@param {LH.Protocol.RawEventMessageRecord[EventName]['params']} params