video-ad-sdk
Version:
VAST/VPAID SDK that allows video ads to be played on top of any player
30 lines (29 loc) • 849 B
TypeScript
/**
* Options map to load script
*/
export interface LoadScriptOptions {
/**
* Type of the script. Defaults to 'text/javascript'.
*/
type?: string;
/**
* If "true" the "async" attribute is added to the new script. Defaults to false.
*/
async?: boolean;
/**
* If "true" the "defer" attribute is added to the new script. Defaults to false.
*/
defer?: boolean;
/**
* Element that should contain the script. Defaults to the parentNode of the currentScript or if missing to document.head.
*/
placeholder?: HTMLElement;
}
/**
* Loads the script source.
*
* @ignore
* @param src The script source.
* @param options The allowed options
*/
export declare const loadScript: (source: string, { async, defer, type, placeholder }?: LoadScriptOptions) => Promise<HTMLScriptElement>;