tor-browser

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

second-argument-dictionary.html (512B)


      1 <!doctype html>
      2 <title>Using dictionary as postMessage's second argument</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <div id="log"></div>
      6 <script>
      7 (async_test()).step(function() {
      8  var worker = new Worker('second-argument-dictionary.js');
      9  var ab = new ArrayBuffer(1);
     10  worker.postMessage(ab, {transfer: [ab]});
     11  worker.onmessage = this.step_func(function(e) {
     12    assert_equals(e.data.byteLength, 1);
     13    this.done();
     14  });
     15 });
     16 </script>