Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
window.addEventListener("WebComponentsReady", () => {
const worker = perspective.worker();
const table = worker.table([{x: 1, y: 2}, {x: 2, y: 2}]);
const elem = document.getElementsByTagName("perspective-viewer")[0];
elem.load(table);
});