Current File : /home/exataengenharia/public_html/node_modules/@splidejs/splide/src/js/utils/dom/focus/focus.ts
/**
 * Focuses the provided element without scrolling the ascendant element.
 *
 * @param elm - An element to focus.
 */
export function focus( elm: HTMLElement ): void {
  elm[ 'setActive' ] && elm[ 'setActive' ]() || elm.focus( { preventScroll: true } );
}