@substrate-system/scroll-lock
Version:
Prevent scrolling
19 lines • 654 B
TypeScript
/**
* Originally seen in [shoelace](https://github.com/shoelace-style/shoelace/blob/next/src/internal/scroll.ts)
*
* Useful for modal windows.
*/
/**
* Prevents body scrolling. Keeps track of which elements requested a lock so
* multiple levels of locking are possible
* without premature unlocking.
*
* Useful for modal windows.
*/
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;
//# sourceMappingURL=index.d.ts.map