diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-08-23 13:26:16 +0200 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-08-23 17:46:29 +0200 |
commit | 5dbc995f73da45ad99b95bc3119c75451b2c415d (patch) | |
tree | d30286edaf27d8d7dfa92fdd4ad609157c7b6dec /desktop/source | |
parent | 978f0071425e89d21225bdd2976abe15e964b6c1 (diff) |
Emscritpen: Use WorkerGlobalScope.importScripts
Change-Id: I19be38564aca4fdd3d827657055b41a867582ba0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172315
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/app/appinit.cxx | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 4490529a77ba..6253b7afe20b 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -75,13 +75,7 @@ extern "C" void getUnoScriptUrls(std::vector<std::u16string> * urls) { } EM_JS(void, runUnoScriptUrl, (char16_t const * url), { - fetch(UTF16ToString(url)).then(res => { - if (!res.ok) { - throw Error( - "Loading <" + res.url + "> failed with " + res.status + " " + res.statusText); - } - return res.blob(); - }).then(blob => blob.text()).then(text => eval(text)); + importScripts(UTF16ToString(url)); }); EM_JS(void, setupMainChannel, (), { |