-
-
Notifications
You must be signed in to change notification settings - Fork 676
/
Copy pathlazyload.d.ts
34 lines (34 loc) · 1.13 KB
/
lazyload.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
interface ILazyLoadOptions {
elements_selector?: string;
container?: HTMLElement;
threshold?: number;
thresholds?: string;
data_src?: string;
data_srcset?: string;
data_sizes?: string;
data_bg?: string;
class_loading?: string;
class_loaded?: string;
class_error?: string;
load_delay?: number;
auto_unobserve?: boolean;
callback_enter?: (elt: HTMLElement) => void;
callback_exit?: (elt: HTMLElement) => void;
callback_loading?: (elt: HTMLElement) => void;
callback_loaded?: (elt: HTMLElement) => void;
callback_error?: (elt: HTMLElement) => void;
callback_finish?: () => void;
use_native?: boolean;
/* DEPRECATED, WILL BE REMOVED IN V. 15 */ callback_reveal?: (elt: HTMLElement) => void;
}
interface ILazyLoad {
new (options?: ILazyLoadOptions, elements?: NodeListOf<HTMLElement>): ILazyLoad;
update: (elements?: NodeListOf<HTMLElement>) => void;
destroy: () => void;
load: (element: HTMLElement, force?: boolean) => void;
loadAll: () => void;
loadingCount: number;
toLoadCount: number;
}
declare var LazyLoad: ILazyLoad;
export default LazyLoad;