@plurid/plurid-functions
Version:
General Utility Functions for Plurid Applications
20 lines (19 loc) • 671 B
TypeScript
export declare const placeCaretAtEnd: (el: any) => void;
/**
* Gets the event path cross-browser.
*
* Based on https://stackoverflow.com/a/39245638
*
* @param event
*/
export declare const getEventPath: (event: Event) => HTMLElement[];
export declare const verifyPathInputElement: (path?: HTMLElement[]) => boolean;
export declare const verifyEventInput: (event: Event) => boolean;
/**
* Downloads `content` as file with `filename`.
*
* @param filename
* @param content
* @param dataString default `'data:text/plain;charset=utf-8,'`
*/
export declare const downloadContent: (filename: string, content: string, dataString?: string) => void;