Emscripten: Better use location.href instead of document.baseURI
...as the former would also be available in a [Shared]WorkerGlobalScope Change-Id: I9b2faccb0d7d6c98381c0e1498b06813d31d987f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188868 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
This commit is contained in:
@@ -31,7 +31,7 @@ namespace {
|
||||
|
||||
extern "C" void getUnoScriptUrls(std::vector<std::u16string> * urls) {
|
||||
assert(urls != nullptr);
|
||||
OUString const base(emscripten::val::global("document")["baseURI"].as<std::u16string>());
|
||||
OUString const base(emscripten::val::global("location")["href"].as<std::u16string>());
|
||||
auto const val = emscripten::val::module_property("uno_scripts");
|
||||
if (!val.isUndefined()) {
|
||||
auto const len = val["length"].as<std::uint32_t>();
|
||||
|
||||
Reference in New Issue
Block a user