Fix global declaration of staticRoot and webRoot

These variables were intended to be globals declare in the global
namespace. That this ends up on the window object is an implementation
detail of JavaScript. Remove the window. prefix put in front of
staticRoot and webRoot and include the global declaration in the
TypeScript module.
This commit is contained in:
Hornwitser committed 2023-11-28 15:35:40 +01:00
1 parent 9df6717364
commit ceb7e48c99
14 files changed
+27 -23

No files matched your search

+2 -2
View File
@@ -20,8 +20,8 @@
}
</style>
<script>
window.webRoot = new URL("__WEB_ROOT__", document.location).pathname;
window.staticRoot = new URL("__STATIC_ROOT__", document.location).pathname;
webRoot = new URL("__WEB_ROOT__", document.location).pathname;
staticRoot = new URL("__STATIC_ROOT__", document.location).pathname;
function scriptError() {
let bootstrapMsg = document.getElementById("bootstrap-msg");
bootstrapMsg.textContent = "Error loading main bundle, see web console for details.";