1 | import { EventGroup } from './EventGroup';
|
2 | /**
|
3 | * Placing this attribute on scrollable divs optimizes detection to know
|
4 | * if the div is scrollable or not (given we can avoid expensive operations
|
5 | * like getComputedStyle.)
|
6 | *
|
7 | * @public
|
8 | */
|
9 | export declare const DATA_IS_SCROLLABLE_ATTRIBUTE = "data-is-scrollable";
|
10 | /**
|
11 | * Allows the user to scroll within a element,
|
12 | * while preventing the user from scrolling the body
|
13 | */
|
14 | export declare const allowScrollOnElement: (element: HTMLElement | null, events: EventGroup) => void;
|
15 | /**
|
16 | * Same as allowScrollOnElement but does not prevent overscrolling.
|
17 | */
|
18 | export declare const allowOverscrollOnElement: (element: HTMLElement | null, events: EventGroup) => void;
|
19 | /**
|
20 | * Disables the body scrolling.
|
21 | *
|
22 | * @public
|
23 | */
|
24 | export declare function disableBodyScroll(): void;
|
25 | /**
|
26 | * Enables the body scrolling.
|
27 | *
|
28 | * @public
|
29 | */
|
30 | export declare function enableBodyScroll(): void;
|
31 | /**
|
32 | * Calculates the width of a scrollbar for the browser/os.
|
33 | *
|
34 | * @public
|
35 | */
|
36 | export declare function getScrollbarWidth(): number;
|
37 | /**
|
38 | * Traverses up the DOM for the element with the data-is-scrollable=true attribute, or returns
|
39 | * document.body.
|
40 | *
|
41 | * @public
|
42 | */
|
43 | export declare function findScrollableParent(startingElement: HTMLElement | null): HTMLElement | Window | undefined | null;
|