denfield-webp-hero
Version:
webp image format polyfill for browsers
14 lines (13 loc) • 475 B
TypeScript
import { Webp } from "../libwebp/dist/webp.js";
export declare type DetectWebpImage = (image: HTMLImageElement) => boolean;
export declare type DetectWebpBackground = (el: HTMLDivElement) => boolean;
export interface WebpMachineOptions {
webp?: Webp;
webpSupport?: Promise<boolean>;
detectWebpImage?: DetectWebpImage;
detectWebpBackground?: DetectWebpBackground;
}
export interface PolyfillDocumentOptions {
document?: Document;
selectors?: string;
}