mirror of
https://github.com/MercuryWorkshop/epoxy-tls.git
synced 2025-05-12 22:10:01 -04:00
slightly change demo.js to allow it to work on older versions
This commit is contained in:
parent
18d8c59ccc
commit
cf0b259eef
1 changed files with 230 additions and 225 deletions
|
@ -1,5 +1,6 @@
|
||||||
import epoxy from "./pkg/epoxy-module-bundled.js";
|
import epoxyModule from "./pkg/epoxy-module-bundled.js";
|
||||||
|
|
||||||
|
(async () => {
|
||||||
const params = (new URL(location.href)).searchParams;
|
const params = (new URL(location.href)).searchParams;
|
||||||
const should_feature_test = params.has("feature_test");
|
const should_feature_test = params.has("feature_test");
|
||||||
const should_multiparallel_test = params.has("multi_parallel_test");
|
const should_multiparallel_test = params.has("multi_parallel_test");
|
||||||
|
@ -28,7 +29,10 @@ const plog = (str) => {
|
||||||
console.log(str);
|
console.log(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { EpoxyClient, EpoxyClientOptions, EpoxyHandlers } = await epoxy();
|
const epoxy = await epoxyModule();
|
||||||
|
const EpoxyClientOptions = epoxy.EpoxyClientOptions;
|
||||||
|
const EpoxyClient = epoxy.EpoxyClient;
|
||||||
|
const EpoxyHandlers = epoxy.EpoxyHandlers;
|
||||||
|
|
||||||
let epoxy_client_options = new EpoxyClientOptions();
|
let epoxy_client_options = new EpoxyClientOptions();
|
||||||
epoxy_client_options.user_agent = navigator.userAgent;
|
epoxy_client_options.user_agent = navigator.userAgent;
|
||||||
|
@ -266,3 +270,4 @@ if (should_feature_test) {
|
||||||
log(await resp.text());
|
log(await resp.text());
|
||||||
}
|
}
|
||||||
log("done");
|
log("done");
|
||||||
|
})();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue