10 lines
205 B
TypeScript
10 lines
205 B
TypeScript
import type { Action } from 'svelte/action';
|
|
|
|
/**
|
|
* Focuses the given HTML element.
|
|
* @param node - The HTML element to focus.
|
|
*/
|
|
export const focus: Action<HTMLElement> = (node) => {
|
|
node.focus();
|
|
};
|