You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.2 KiB

1 month ago
  1. /**
  2. * Determine if the testing element is visible on screen no matter if its on the viewport or not
  3. */
  4. export declare const isVisible: (element: HTMLElement) => boolean;
  5. export declare const obtainAllFocusableElements: (element: HTMLElement) => HTMLElement[];
  6. /**
  7. * @desc Determine if target element is focusable
  8. * @param element {HTMLElement}
  9. * @returns {Boolean} true if it is focusable
  10. */
  11. export declare const isFocusable: (element: HTMLElement) => boolean;
  12. /**
  13. * @desc Set Attempt to set focus on the current node.
  14. * @param element
  15. * The node to attempt to focus on.
  16. * @returns
  17. * true if element is focused.
  18. */
  19. export declare const attemptFocus: (element: HTMLElement) => boolean;
  20. /**
  21. * Trigger an event
  22. * mouseenter, mouseleave, mouseover, keyup, change, click, etc.
  23. * @param {HTMLElement} elm
  24. * @param {String} name
  25. * @param {*} opts
  26. */
  27. export declare const triggerEvent: (elm: HTMLElement, name: string, ...opts: Array<boolean>) => HTMLElement;
  28. export declare const isLeaf: (el: HTMLElement) => boolean;
  29. export declare const getSibling: (el: HTMLElement, distance: number, elClass: string) => Element | null;
  30. export declare const focusNode: (el: HTMLElement) => void;