UNPKG

@wezom/zz-load

Version:

Lazy loader based on IntersectionObserver API

9 lines (8 loc) 306 B
import { Options } from '../types'; export default function ( element: HTMLImageElement, resource: string, { setSourcesOnlyOnLoad }: Options, loadActions: (loadEvent: Event, resource?: string | undefined) => void, errorActions: (errorEvent: ErrorEvent, resource?: string | undefined) => void ): void;