Skip to content

Commit

Permalink
Merge pull request #897 from bummoblizard/lockdown-mode-support
Browse files Browse the repository at this point in the history
Lockdown mode support #895
  • Loading branch information
bummoblizard authored Aug 14, 2023
2 parents d60881d + eeb1edf commit 6162903
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Dependencies/monaco-textmate.bundle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,22 @@

setTimeout(() => {
if (typeof editor === "undefined") {
location.reload();
// Special handling for Lockdown Mode (no WebAssembly)
// https://github.com/thebaselab/codeapp/issues/895
if (typeof WebAssembly === "undefined") {
const editor = monaco.editor.create(
document.getElementById("container"),
{
value: '',
language: "javascript",
theme: "vs-dark",
}
);
window.editor = editor;
applyListeners(editor)
}else {
location.reload();
}
}
}, 1000);

Expand Down

0 comments on commit 6162903

Please sign in to comment.