17 lines
568 B
TypeScript
Raw Normal View History

2024-08-20 23:25:37 +04:00
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 {};