Files
finos--perspective/rust/perspective-js/test/html/shared_worker.html
T
2026-07-13 12:23:53 +08:00

19 lines
956 B
HTML

<!doctype html>
<html>
<head>
<script type="module">
import perspective from "/node_modules/@perspective-dev/client/dist/esm/perspective.js";
let resp = await fetch("/node_modules/@perspective-dev/test/assets/superstore.csv");
let csv = await resp.text();
const wasm = fetch("/node_modules/@perspective-dev/client/dist/wasm/perspective-js.wasm");
const wasm2 = fetch("/node_modules/@perspective-dev/server/dist/wasm/perspective-server.wasm");
perspective.init_client(wasm);
perspective.init_server(wasm2);
const worker = await perspective.worker(new SharedWorker("/node_modules/@perspective-dev/client/dist/cdn/perspective-server.worker.js"));
window.table = worker.table(csv, { index: "Row ID" });
window.__TEST_WORKER__ = worker;
window.__TEST_PERSPECTIVE_READY__ = true;
</script>
</head>
</html>