@egjs/imready
Version:
This module is used to wait for the image or video to be ready.
13 lines (12 loc) • 981 B
TypeScript
import { ArrayFormat } from "./types";
export declare function getAttribute(el: HTMLElement, name: string): string;
export declare function toArray<T>(arr: ArrayFormat<T>): T[];
export declare function hasSizeAttribute(target: HTMLElement, prefix?: string): boolean;
export declare function hasLoadingAttribute(target: HTMLElement, prefix?: string): target is HTMLImageElement;
export declare function hasSkipAttribute(target: HTMLElement, prefix?: string): boolean;
export declare function addEvent(element: EventTarget, type: string, handler: (...args: any[]) => void): void;
export declare function removeEvent(element: EventTarget, type: string, handler: (...args: any[]) => void): void;
export declare function innerWidth(el: HTMLElement): number;
export declare function innerHeight(el: HTMLElement): number;
export declare function getStyles(el: Element): any;
export declare function getContentElements(element: HTMLElement, tags: string[], prefix: string): HTMLElement[];