doc-wasm-sourcemaps.html (690B)
1 <!-- This Source Code Form is subject to the terms of the Mozilla Public 2 - License, v. 2.0. If a copy of the MPL was not distributed with this 3 - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> 4 <!DOCTYPE html> 5 <html> 6 <head> 7 <meta charset="utf-8"/> 8 <title>Wasm+sourcemaps</title> 9 <script> 10 // Immediately load the WASM file 11 const wasmInstancePromise = WebAssembly.instantiateStreaming(fetch("wasm-sourcemaps/fib.wasm")); 12 13 async function runWasm() { 14 const { instance } = await wasmInstancePromise; 15 const result = instance .exports.fib(5); 16 return result; 17 } 18 </script> 19 </head> 20 21 <body> 22 </body> 23 </html>