<!doctype html>

<html>

<head>
    <title>WASM customSections() test</title>
</head>

<body>
    <script>
        WebAssembly.compileStreaming(fetch("simple-name-section.wasm"))
        .then(module => {
          const nameSections = WebAssembly.Module.customSections(module, "name");
          if (nameSections.length !== 0) {
            console.log("Module contains a name section");
            console.log(nameSections[0]);
          }
        });
    </script>
</body>

</html>
