desktop/source/app/appinit.cxx |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 5dbc995f73da45ad99b95bc3119c75451b2c415d
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Fri Aug 23 13:26:16 2024 +0200
Commit:     Stephan Bergmann <stephan.bergm...@allotropia.de>
CommitDate: Fri Aug 23 17:46:29 2024 +0200

    Emscritpen: Use WorkerGlobalScope.importScripts
    
    Change-Id: I19be38564aca4fdd3d827657055b41a867582ba0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172315
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Tested-by: Jenkins

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, (), {

Reply via email to