fix: use no-modules WASM target for simpler loading
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head><title>WASM Test</title></head>
|
||||
<body>
|
||||
<h1>WASM Test Page</h1>
|
||||
<div id="output">Loading...</div>
|
||||
<script type="module">
|
||||
try {
|
||||
const mod = await WebAssembly.compileStreaming(
|
||||
fetch('/doc-wasm/pkg/doc_wasm_bg.wasm')
|
||||
);
|
||||
document.getElementById('output').textContent = 'WASM compiled OK! Size: ' + mod.byteLength + ' bytes';
|
||||
} catch(e) {
|
||||
document.getElementById('output').textContent = 'ERROR: ' + e.message;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user