MCPcopy Create free account
hub / github.com/microsoft/SandDance / toBlobURL

Function toBlobURL

docs/app/js/sanddance-app.js:142259–142266  ·  view source on GitHub ↗
(data2, mime)

Source from the content-addressed store, hash-verified

142257 return type === (0, _vegaScenegraph.RenderType).SVG ? toBlobURL(r.svg(), "image/svg+xml") : r.canvas().toDataURL("image/png");
142258}
142259function toBlobURL(data2, mime) {
142260 const blob = new Blob([
142261 data2
142262 ], {
142263 type: mime
142264 });
142265 return window.URL.createObjectURL(blob);
142266}
142267/**
142268 * Produce a Canvas instance containing a rendered visualization.
142269 * This method is asynchronous, returning a Promise instance.

Callers 1

renderToImageURLFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected