Archived
Template
1
Fork 0
This repository has been archived on 2024-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Contour/public/@shoelace-style/shoelace/cdn/internal/scroll.d.ts
2024-01-30 10:59:28 -05:00

11 lines
711 B
TypeScript

/**
* Prevents body scrolling. Keeps track of which elements requested a lock so multiple levels of locking are possible
* without premature unlocking.
*/
export declare function lockBodyScrolling(lockingEl: HTMLElement): void;
/**
* Unlocks body scrolling. Scrolling will only be unlocked once all elements that requested a lock call this method.
*/
export declare function unlockBodyScrolling(lockingEl: HTMLElement): void;
/** Scrolls an element into view of its container. If the element is already in view, nothing will happen. */
export declare function scrollIntoView(element: HTMLElement, container: HTMLElement, direction?: 'horizontal' | 'vertical' | 'both', behavior?: 'smooth' | 'auto'): void;