Function dispatchEvent

  • Simulate an event, ensures the target property is correct.

    dispatchEvent(window, KeyboardEvent, "keydown", { key: "Enter" });
    

    Type Parameters

    • E extends Event

    Parameters

    Returns void