MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / fetchLoadCachedData

Function fetchLoadCachedData

src/Fetch.js:374–383  ·  view source on GitHub ↗
(db, fetch, onsuccess, onerror)

Source from the content-addressed store, hash-verified

372}
373
374function fetchLoadCachedData(db, fetch, onsuccess, onerror) {
375 if (!db) {
376#if FETCH_DEBUG
377 dbg('fetch: IndexedDB not available!');
378#endif
379 onerror(fetch, 0, 'IndexedDB not available!');
380 return;
381 }
382
383 var fetch_attr = fetch + {{{ C_STRUCTS.emscripten_fetch_t.__attributes }}};
384 var path = {{{ makeGetValue('fetch_attr', C_STRUCTS.emscripten_fetch_attr_t.destinationPath, '*') }}};
385 path ||= {{{ makeGetValue('fetch', C_STRUCTS.emscripten_fetch_t.url, '*') }}};
386 var pathStr = UTF8ToString(path);

Callers 1

Fetch.jsFile · 0.85

Calls 2

dbgFunction · 0.50
onerrorFunction · 0.50

Tested by

no test coverage detected