desktop/source/app/appinit.cxx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
New commits: commit c3d32f43aa956a745828d7357ac73825e0ed4cd7 Author: Stephan Bergmann <[email protected]> AuthorDate: Fri Aug 23 13:26:16 2024 +0200 Commit: Stephan Bergmann <[email protected]> CommitDate: Sat Oct 5 20:57:25 2024 +0200 Emscritpen: Use WorkerGlobalScope.importScripts Change-Id: I19be38564aca4fdd3d827657055b41a867582ba0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172315 Reviewed-by: Stephan Bergmann <[email protected]> Tested-by: Jenkins (cherry picked from commit 5dbc995f73da45ad99b95bc3119c75451b2c415d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174451 Tested-by: Stephan Bergmann <[email protected]> diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index b7e7f0e921dd..ad2c25f64dab 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -80,13 +80,7 @@ extern "C" void getUnoScriptUrls(std::vector<OUString> * 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, (), {
