"Fossies" - the Fresh Open Source Software Archive 
Member "jitsi-meet-7319/react/features/base/util/loadScript.web.ts" (6 Jun 2023, 642 Bytes) of package /linux/misc/jitsi-meet-7319.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 /**
2 * Loads a script from a specific URL. The script will be interpreted upon load.
3 *
4 * @param {string} url - The url to be loaded.
5 * @returns {Promise} Resolved with no arguments when the script is loaded and
6 * rejected with the error from JitsiMeetJS.ScriptUtil.loadScript method.
7 */
8 export function loadScript(url: string): Promise<void> {
9 return new Promise((resolve, reject) =>
10 JitsiMeetJS.util.ScriptUtil.loadScript(
11 url,
12 /* async */ true,
13 /* prepend */ false,
14 /* relativeURL */ false,
15 /* loadCallback */ resolve,
16 /* errorCallback */ reject));
17 }