Skip to content

Function: setGraphWorkerUrl() ​

ts
function setGraphWorkerUrl(address): void;

Serve the worker file from a URL of your own: copy dist/layout-worker.js of @mk7s/holochart-traces-graph (one file, no imports) to your site and give its address here, before the first graph is laid out. For apps whose Content Security Policy or bundler keeps the file from loading from where the package looks for it. null goes back to the default. A worker that is already running is ended; the next layout starts one from the new address.

The address has to be of the page's own origin: browsers do not start a worker from another.

Parameters ​

ParameterType
addressstring | URL | null

Returns ​

void

Released under the MIT License.