tor-browser

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

js-wasm-cycle.js (375B)


      1 function f() { return 42; }
      2 export { f };
      3 
      4 import { mem, tab, glob, func } from "./js-wasm-cycle.wasm";
      5 assert_true(glob instanceof WebAssembly.Global);
      6 assert_equals(glob.valueOf(), 1);
      7 assert_true(mem instanceof WebAssembly.Memory);
      8 assert_true(tab instanceof WebAssembly.Table);
      9 assert_true(func instanceof Function);
     10 
     11 f = () => { return 24 };
     12 
     13 assert_equals(func(), 42);