Skip to content

Commit

Permalink
Update files/en-us/webassembly/javascript_builtins/index.md
Browse files Browse the repository at this point in the history
Co-authored-by: Hamish Willee <[email protected]>
  • Loading branch information
chrisdavidmills and hamishwillee authored Dec 18, 2024
1 parent 9675e55 commit f6d884e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/webassembly/javascript_builtins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fetch("log-concat.wasm")
The JavaScript:

- Defines an `importObject` that specifies a function `"log"` at a namespace `"m"` to import into the Wasm module during instantiation. It's the {{domxref("console.log()")}} function.
- Defines a `compileOptions` function that includes the `builtins` and `importedStringConstants` properties. As discussed earlier, this is needed to enable builtins and imported global string constants.
- Defines a `compileOptions` object that includes the `builtins` and `importedStringConstants` properties. As discussed earlier, this is needed to enable builtins and imported global string constants.
- Uses {{domxref("Window.fetch", "fetch()")}} to fetch the Wasm module (`log-concat.wasm`), converts the response to an {{jsxref("ArrayBuffer")}} using {{domxref("Response.arrayBuffer")}}, then compiles and instantiates the Wasm module using [`WebAssembly.instantiate()`](/en-US/docs/WebAssembly/JavaScript_interface/instantiate_static).
- Calls the `main()` function exported from the Wasm module.

Expand Down

0 comments on commit f6d884e

Please sign in to comment.