type: event.type,
        target: `<${event.target.localName} id="${event.target.id}">`,
        button: event.button,
        buttons: event.buttons,
        pointerId: event.pointerId,
        pointerType: event.pointerType,
      };
      if (event.pointerId != undefined) {
        pointerEvents.push(e);
      } else {
        mouseEvents.push(e);
      }
    }
    for (const type of ["mouseover", "mouseout", "mouseenter", "mouseleave",
                        "pointerover", "pointerout", "pointerenter",