UNPKG

@likun./lazy-img

Version:

a custom element of image-lazy-loading based on web-components

20 lines (19 loc) 592 B
declare class LazyImg extends HTMLElement { private shadow; private img; private done; private observer; constructor(); static observedAttributes: string[]; attributeChangedCallback(name: any, oldVal: any, newVal: any): void; connectedCallback(): void; disconnectedCallback(): void; private init; get isInViewport(): boolean; get isSupportIntersectionObserver(): boolean; createIntersectionObserver: () => void; handleEmit: (eventName: string) => void; handleLoad: () => void; handleError: () => void; } export default LazyImg;