Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

loadScript.web.js 686B

123456789101112131415161718192021
  1. // @flow
  2. declare var JitsiMeetJS: Object;
  3. /**
  4. * Loads a script from a specific URL. The script will be interpreted upon load.
  5. *
  6. * @param {string} url - The url to be loaded.
  7. * @returns {Promise} Resolved with no arguments when the script is loaded and
  8. * rejected with the error from JitsiMeetJS.ScriptUtil.loadScript method.
  9. */
  10. export function loadScript(url: string): Promise<void> {
  11. return new Promise((resolve, reject) =>
  12. JitsiMeetJS.util.ScriptUtil.loadScript(
  13. url,
  14. /* async */ true,
  15. /* prepend */ false,
  16. /* relativeURL */ false,
  17. /* loadCallback */ resolve,
  18. /* errorCallback */ reject));
  19. }