ashish-sdk
Version:
ThoughtSpot Embed SDK
29 lines (28 loc) • 1.24 kB
TypeScript
export declare const getDocumentBody: () => string;
declare type DOMElement = HTMLElement | Document;
export declare const getRootEl: () => HTMLElement;
export declare const getRootEl2: () => HTMLElement;
export declare const getIFrameEl: (container?: DOMElement) => HTMLIFrameElement;
export declare const getAllIframeEl: () => NodeListOf<HTMLIFrameElement>;
export declare const getIFrameSrc: (container?: DOMElement) => string;
/**
* jsdom does not set event source, therefore we do it
* programmatically and use dispatchEvent instead of the
* postMessage API
* Reference: https://github.com/jsdom/jsdom/issues/2745
* @param window
* @param data
*/
export declare const postMessageToParent: (window: WindowProxy, data: any, port?: any) => void;
/**
* Execute a given function after a certain time has elapsed
* @param fn The function to be executed after the wait period
* @param waitTime The wait period in milliseconds
*/
export declare const executeAfterWait: (fn: (...args: any[]) => void, waitTime?: number) => Promise<unknown>;
/**
* Time (in milliseconds) to wait for async events to be triggered
*/
export declare const EVENT_WAIT_TIME = 1000;
export declare function fixedEncodeURI(str: string): string;
export {};