UNPKG

reakit-utils

Version:

Reakit utils

13 lines (12 loc) 390 B
/** * Creates and dispatches `KeyboardEvent` in a way that also works on IE 11. * * @example * import { fireKeyboardEvent } from "reakit-utils"; * * fireKeyboardEvent(document.getElementById("id"), "keydown", { * key: "ArrowDown", * shiftKey: true, * }); */ export declare function fireKeyboardEvent(element: HTMLElement, type: string, eventInit: KeyboardEventInit): boolean;