selectionRange.d.ts 568 B

12345678910111213141516
  1. declare enum selectionSupportType {
  2. 'text' = "text",
  3. 'search' = "search",
  4. 'url' = "url",
  5. 'tel' = "tel",
  6. 'password' = "password"
  7. }
  8. export declare function hasSelectionSupport(element: Element): element is HTMLTextAreaElement | (HTMLInputElement & {
  9. type: selectionSupportType;
  10. });
  11. export declare function getSelectionRange(element: Element): {
  12. selectionStart: number | null;
  13. selectionEnd: number | null;
  14. };
  15. export declare function setSelectionRange(element: Element, newSelectionStart: number, newSelectionEnd: number): void;
  16. export {};