UNPKG

@egjs/imready

Version:

This module is used to wait for the image or video to be ready.

32 lines (31 loc) 914 B
import Component from "@egjs/component"; import { ArrayFormat, ImReadyEvents, ImReadyOptions } from "./types"; declare class ImReadyManager extends Component<ImReadyEvents> { options: ImReadyOptions; private readyCount; private preReadyCount; private totalCount; private totalErrorCount; private isPreReadyOver; private elementInfos; constructor(options?: Partial<ImReadyOptions>); check(elements: ArrayFormat<HTMLElement>): this; getTotalCount(): number; isPreReady(): boolean; isReady(): boolean; hasError(): boolean; clear(): void; destroy(): void; private getLoader; private clone; private checkPreReady; private checkReady; private onError; private onPreReadyElement; private onPreReady; private onReadyElement; private onReady; private getErrorCount; private hasLoading; } export default ImReadyManager;