選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

loadScript.web.ts 642B

1234567891011121314151617
  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. }