Files
uutils.github.io/templates/shortcodes/wasm_example.html
T
Sylvestre Ledru 965c898e51 Playground fixes: avoid double-fetch, CSP-safe event handling, hide from nav
- Clone WASM response before compileStreaming so fallback doesn't re-fetch
- Guard against concurrent ensureRuntime() calls with a promise cache
- Replace inline onclick with event delegation for CSP compatibility
- Add SRI note for WASI shim dynamic import
- Skip l10n tests that require French translations in WASM binary
- Replace uninteresting fmt example with printf sheep | nl
- Hide Playground link from top navigation for now
2026-04-03 22:13:57 +02:00

11 lines
471 B
HTML

<div class="wasm-example" data-command="{{ command }}">
<div class="wasm-example-code">
<pre><code>$ {{ command }}</code></pre>
<button class="wasm-run-btn">Run</button>
</div>
<div class="wasm-example-output" style="display:none">
<pre></pre>
</div>
</div>
<script>if(!document.querySelector('script[src="/js/wasm-example.js"]')){var s=document.createElement("script");s.src="/js/wasm-example.js";s.defer=true;document.head.appendChild(s);}</script>