html-to-image
Version:
Generates an image from a DOM node using HTML5 canvas and SVG.
16 lines (15 loc) • 980 B
TypeScript
export declare const uuid: () => string;
export declare function getExtension(url: string): string;
export declare function getMimeType(url: string): string;
export declare function delay(ms: number): (ret: any) => Promise<any>;
export declare function isDataUrl(url: string): boolean;
export declare function toDataURL(content: string, mimeType: string): string;
export declare function getDataURLContent(dataURL: string): string;
export declare function canvasToBlob(canvas: HTMLCanvasElement): Promise<Blob | null>;
export declare function toArray<T>(arrayLike: any): T[];
export declare function getNodeWidth(node: HTMLElement): number;
export declare function getNodeHeight(node: HTMLElement): number;
export declare function getPixelRatio(): number;
export declare function createImage(url: string): Promise<HTMLImageElement>;
export declare function svgToDataURL(svg: SVGElement): Promise<string>;
export declare function getBlobFromImageURL(url: string): Promise<string>;