WebAssembly.compileStreaming(fetch("simple-name-section.wasm")).then((mod) => {
const nameSections = WebAssembly.Module.customSections(mod, "name");
if (nameSections.length !== 0) {
console.log("Module contains a name section");
console.log(nameSections[0]);
}
});WebAssembly.Module.customSections() / notebook
WebAssembly.Module.customSections()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.