MCPcopy Create free account
hub / github.com/breck7/scroll / image

Function image

external/.d3.js:8370–8378  ·  view source on GitHub ↗
(input, init)

Source from the content-addressed store, hash-verified

8368var tsv = dsvParse(tsvParse);
8369
8370function image(input, init) {
8371 return new Promise(function(resolve, reject) {
8372 var image = new Image;
8373 for (var key in init) image[key] = init[key];
8374 image.onerror = reject;
8375 image.onload = function() { resolve(image); };
8376 image.src = input;
8377 });
8378}
8379
8380function responseJson(response) {
8381 if (!response.ok) throw new Error(response.status + " " + response.statusText);

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected