diff --git a/misc/dist/html/editor.html b/misc/dist/html/editor.html
index a681a2a1c39..3e84d30113d 100644
--- a/misc/dist/html/editor.html
+++ b/misc/dist/html/editor.html
@@ -68,6 +68,11 @@
height: 100%;
overflow: auto;
background-color: hsla(0, 0%, 0%, 0.5);
+ text-align: left;
+ }
+
+ .welcome-modal-title {
+ text-align: center;
}
.welcome-modal-content {
@@ -238,7 +243,7 @@
onclick="if (event.target === this) closeWelcomeModal(false)"
>
-
Important - Please read before continuing
+
Important - Please read before continuing
The Godot Web Editor has some limitations compared to the native version.
@@ -254,9 +259,38 @@
>Web editor documentation for usage instructions and limitations.
-
- OK, don't show again
-
+
+
+ The web server does not support cross-origin isolation,
+ which is required for the Godot Web Editor to function.
+
+
+ Reasons for cross-origin isolation being disabled:
+
+
+ This page is not served from a secure context (HTTPS or localhost).
+
+
+ This page may not be served with cross-origin isolation headers
+ (check with the developer tools' Network tab).
+
+
+
+
+ If you are self-hosting the web editor,
+ refer to
+ Exporting for the Web - Threads for more information.
+
+
+
+
+ OK, don't show again
+
+
@@ -330,7 +364,16 @@
navigator.serviceWorker.register("service.worker.js");
}
- if (localStorage.getItem("welcomeModalDismissed") !== 'true') {
+ if (!crossOriginIsolated) {
+ // Display error dialog as threading support is required for the editor.
+ setButtonEnabled('startButton', false);
+ document.getElementById("welcome-modal-description").style.display = "none";
+ document.getElementById("welcome-modal-description-no-cross-origin-isolation").style.display = "block";
+ document.getElementById("welcome-modal-dismiss").style.display = "none";
+ document.getElementById("welcome-modal-reason-not-secure").style.display = window.isSecureContext ? "none" : "list-item";
+ }
+
+ if (!crossOriginIsolated || localStorage.getItem("welcomeModalDismissed") !== 'true') {
document.getElementById("welcome-modal").style.display = "block";
document.getElementById("welcome-modal-dismiss").focus();
}