Simulate an event, ensures the target property is correct.
target
dispatchEvent(window, KeyboardEvent, "keydown", { key: "Enter" }); Copy
dispatchEvent(window, KeyboardEvent, "keydown", { key: "Enter" });
Optional
Simulate an event, ensures the
target
property is correct.