Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Add an example with a web worker #7

@Fil

Description

@Fil
  const importScript = u =>
    window.location.href.includes(".observableusercontent.com")
      ? `https://unpkg.com/${u}`
      : `${window.location.href.replace(/\/[^/]*$/, "")}/${u}.js`;

  const worker = createWorkerFrom(`
  // load external scripts
  importScripts("${importScript("d3@5")}");
  importScripts("${importScript("d3-delaunay@5")}");
  …

`)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions