Skip to content

Commit

Permalink
feat: add alert when multi threading isnt available
Browse files Browse the repository at this point in the history
  • Loading branch information
DerStimmler committed Jul 22, 2024
1 parent 43762e3 commit a051899
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/wasm-mt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ export async function convertWasmMt() {
return;
}

if (!window.crossOriginIsolated) {
alert(
"Cross origin isolation is not enabled on GitHub pages. Run the project locally to use Multi-Threading."
);
return;
}

const formatInput = document.getElementById(
"wasm-mt-format-input"
) as HTMLSelectElement;
Expand Down

0 comments on commit a051899

Please sign in to comment.