tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

exported-names.tentative.html (670B)


      1 <!doctype html>
      2 <title>Exported names from a WebAssembly module</title>
      3 
      4 <script src="/resources/testharness.js"></script>
      5 <script src="/resources/testharnessreport.js"></script>
      6 <script type=module>
      7 setup({ single_test: true });
      8 import * as mod from "./resources/exported-names.wasm";
      9 assert_array_equals(Object.getOwnPropertyNames(mod).sort(),
     10                    ["func", "glob", "mem", "tab"]);
     11 assert_true(mod.func instanceof Function);
     12 assert_true(mod.mem instanceof WebAssembly.Memory);
     13 assert_true(mod.glob instanceof WebAssembly.Global);
     14 assert_true(mod.tab instanceof WebAssembly.Table);
     15 assert_throws_js(TypeError, () => { mod.func = 2; });
     16 done();
     17 </script>