diff --git a/docs/src/components/PySandboxExample.astro b/docs/src/components/PySandboxExample.astro index 2e83c7d..04fb5aa 100644 --- a/docs/src/components/PySandboxExample.astro +++ b/docs/src/components/PySandboxExample.astro @@ -45,6 +45,9 @@ const { code, target, worker, restricted } = Astro.props; let sandbox; try { if (this.dataset.worker) { + if (typeof SharedArrayBuffer === "undefined") { + throw new Error("Unable to use SharedArrayBuffer due insecure environment."); + } sandbox = await getWorkerSandbox({ restricted: this.dataset.restricted, });