You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<perspective-viewer id="viewer" editable></perspective-viewer>
<script>
window.addEventListener("DOMContentLoaded", async function () {
// Create a client that expects a Perspective server
// to accept connections at the specified URL.
const websocket = perspective.websocket(
"ws://localhost:8888/websocket"
);
// Get a handle to the Table on the server
const server_table = websocket.open_table("data_source_one");
// Create a new view
const server_view = await table.view();
// Create a Table on the client using `perspective.worker()`
const worker = perspective.worker();
const client_table = await worker.table(view);
// Load the client table in the `<perspective-viewer>`.
document.getElementById("viewer").load(client_table);
});
</script>
Of course, table is not defined.
Worse, server_table.view() is not a function.
Solution
The Tornado example works. Hard problem to keep the web guide snippets in sync with fast-moving codebase, for sure. But here's the details:
Specifics
add worker in the guide
await the open_table
server_view from server_table, not table
worker.table isn't a future
The text was updated successfully, but these errors were encountered:
Bug Report
See https://perspective.finos.org/docs/python/, specifically the Torando websocket example
index.html
:Of course,
table
is not defined.Worse,
server_table.view()
is not a function.Solution
The Tornado example works. Hard problem to keep the web guide snippets in sync with fast-moving codebase, for sure. But here's the details:
Specifics
The text was updated successfully, but these errors were encountered: