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

Function preload

docs/app/js/sanddance-app.js:107880–107887  ·  view source on GitHub ↗
(target, url, format)

Source from the content-addressed store, hash-verified

107878 };
107879}
107880async function preload(target, url, format) {
107881 const df = this, pending = df._pending || loadPending(df);
107882 pending.requests += 1;
107883 const res = await df.request(url, format);
107884 df.pulse(target, df.changeset().remove((0, _vegaUtil.truthy)).insert(res.data || []));
107885 pending.done();
107886 return res;
107887}
107888function loadPending(df) {
107889 let accept;
107890 const pending = new Promise((a)=>accept = a);

Callers

nothing calls this directly

Calls 3

loadPendingFunction · 0.70
removeMethod · 0.45
doneMethod · 0.45

Tested by

no test coverage detected