emulate-key-in-browser
Version:
emulate browsers reactions on special keys
6 lines (5 loc) • 442 B
TypeScript
export declare type TextInputElement = HTMLInputElement | HTMLTextAreaElement;
export declare function isTextInputElement(element: Element): element is TextInputElement;
export declare function getValueLength(target: TextInputElement): number;
export declare function findSelectionStart(target: TextInputElement, valueLength?: number): number;
export declare function findSelectionEnd(target: TextInputElement, valueLength?: number): number;