-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83e6e2d
commit 41aa930
Showing
2 changed files
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
document.addEventListener('DOMContentLoaded', async function() { | ||
const wasmCheckbox = document.getElementById('wasm'); | ||
const extraWasmLabel = document.getElementById('extraWasmLabel'); | ||
wasmCheckbox.disabled = true; // Initially disable the checkbox | ||
|
||
try { | ||
if (await wasmFeatureDetect.tailCall()) { | ||
wasmCheckbox.disabled = false; // Re-enable the checkbox if tail calls are supported | ||
} else { | ||
wasmCheckbox.checked = false; | ||
|
||
if (navigator.userAgent.includes('Firefox')) { | ||
extraWasmLabel.innerHTML = '(enable <code>javascript.options.wasm_tail_calls</code> in <code>about:config</code>)'; | ||
} else { | ||
extraWasmLabel.innerHTML = '(wasm tail calls not supported)'; | ||
} | ||
} | ||
} catch (error) { | ||
console.error('Error checking wasm tail call support:', error); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters