tor-browser

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

modulepreload-cross-origin.h2.window.js (597B)


      1 // META: script=/common/utils.js
      2 // META: script=resources/early-hints-helpers.sub.js
      3 
      4 // see modulepreload-in-early-hints.h2.window.js for params explanation
      5 test(() => {
      6    const params = new URLSearchParams();
      7    params.set("description", "Modulepreload works in early hints from cross-origin url");
      8    params.set("resource-url",
      9        CROSS_ORIGIN_RESOURCES_URL + "/empty.js?" + token());
     10    params.set("should-preload", true);
     11    const test_url = "resources/modulepreload-in-early-hints.h2.py?" + params.toString();
     12    window.location.replace(new URL(test_url, window.location));
     13 });