
telemetry.webworker.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pronghorn Show documentation
Show all versions of pronghorn Show documentation
Primary dependency for any project using the Pronghorn framework
The newest version!
/*global Viz: false */
const worker = this;
worker.importScripts('viz-lite.js');
worker.onmessage = async message => {
const dotUrl = message.data;
if (!dotUrl) return;
try {
const response = await fetch(dotUrl);
const dot = await response.text();
const svg = Viz(dot, {format: 'svg', engine: 'dot'});
worker.postMessage(svg);
} catch (e) {
console.error('Error:', e);
}
};
© 2015 - 2025 Weber Informatics LLC | Privacy Policy