UNPKG

@studiometa/js-toolkit

Version:

A set of useful little bits of JavaScript to boost your project! 🚀

18 lines (17 loc) • 587 B
/** * Save the current active element. */ export declare function saveActiveElement(): void; /** * Trap tab navigation inside the given element. * * @param {HTMLElement} element The element in which to trap the tabulations. * @param {KeyboardEvent} event The keydown or keyup event. * @link https://js-toolkit.studiometa.dev/utils/trapFocus.html */ export declare function trapFocus(element: HTMLElement, event: KeyboardEvent): void; /** * Untrap the tab navigation. * @link https://js-toolkit.studiometa.dev/utils/trapFocus.html */ export declare function untrapFocus(): void;