• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// There aren't many cloneable types that will cause an error on
2// deserialization. WASM modules have the property that it's an error to
3// deserialize them cross-site, which works for our purposes.
4async function createWasmModule() {
5  // It doesn't matter what the module is, so we use one from another
6  // test.
7  const response =
8        await fetch("/wasm/serialization/module/resources/incrementer.wasm");
9  const ab = await response.arrayBuffer();
10  return WebAssembly.compile(ab);
11}
12