All Downloads are FREE. Search and download functionalities are using the official Maven repository.

telemetry.webworker.js Maven / Gradle / Ivy

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