svgcanvas/types/element.d.ts

23 lines
1.3 KiB
TypeScript

export default SVGCanvasElement;
declare function SVGCanvasElement(options: any): void;
declare class SVGCanvasElement {
constructor(options: any);
ctx: any;
svg: any;
wrapper: HTMLDivElement;
getContext(type: any): any;
toObjectURL(): string;
/**
* toDataURL returns a data URI containing a representation of the image in the format specified by the type parameter.
*
* @param {String} type A DOMString indicating the image format. The default type is image/svg+xml; this image format will be also used if the specified type is not supported.
* @param {Number} encoderOptions A Number between 0 and 1 indicating the image quality to be used when creating images using file formats that support lossy compression (such as image/jpeg or image/webp). A user agent will use its default quality value if this option is not specified, or if the number is outside the allowed range.
* @param {Boolean} options.async Will return a Promise<String> if true, must be set to true if type is not image/svg+xml
*/
toDataURL(type: string, encoderOptions: number, options: any): string | Promise<string>;
addEventListener(...args: any[]): any;
getElement(): HTMLDivElement;
getAttribute(prop: any): string;
setAttribute(prop: any, val: any): void;
}