package.dist.utils.edit.selectionRange.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of user-event Show documentation
Show all versions of user-event Show documentation
Fire events the same way the user does
The newest version!
declare enum selectionSupportType {
'text' = "text",
'search' = "search",
'url' = "url",
'tel' = "tel",
'password' = "password"
}
export declare function hasSelectionSupport(element: Element): element is HTMLTextAreaElement | (HTMLInputElement & {
type: selectionSupportType;
});
export declare function getSelectionRange(element: Element): {
selectionStart: number | null;
selectionEnd: number | null;
};
export declare function setSelectionRange(element: Element, newSelectionStart: number, newSelectionEnd: number): void;
export {};