cloneEvent = (ev, ov = {}) => {
  const newEvent = /** @type {any} */ (new SyntheticEvent());

  // Copy over original event getters/setters first, will need some extra
  // intelligence to ensure getters/setters work, thx @kofifus.
  for (let key in ev) {
    const desc = getOwnPropertyDescriptor(ev, key);

    if (key === 'isTrusted') { continue; }

    if (desc && desc.get) {
      defineProperty(newEvent, key, desc);
    }
    else {
      newEvent[key] = ev[key];
    }
  }

  // Copy over overrides.
  for (let key in ov) {
    newEvent[key] = ov[key];
  }

  return newEvent;
}
@param {{ [key: string]: any }} ev
@param {{ [key: string]: any }} ov