snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
18
react/features/base/util/loadScript.web.ts
Normal file
18
react/features/base/util/loadScript.web.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Loads a script from a specific URL. The script will be interpreted upon load.
|
||||
*
|
||||
* @param {string} url - The url to be loaded.
|
||||
* @returns {Promise} Resolved with no arguments when the script is loaded and
|
||||
* rejected with the error from JitsiMeetJS.ScriptUtil.loadScript method.
|
||||
*/
|
||||
export function loadScript(url: string): Promise<void> {
|
||||
return new Promise((resolve, reject) =>
|
||||
JitsiMeetJS.util.ScriptUtil.loadScript(
|
||||
{ src: url,
|
||||
async: true,
|
||||
prepend: false,
|
||||
relativeURL: false,
|
||||
loadCallback: resolve,
|
||||
errorCallback: reject
|
||||
}));
|
||||
}
|
||||
Reference in New Issue
Block a user