MCPcopy Create free account
hub / github.com/ampproject/amphtml / saveBlob

Method saveBlob

src/service/storage-impl.js:374–383  ·  view source on GitHub ↗

@override

(origin, blob)

Source from the content-addressed store, hash-verified

372
373 /** @override */
374 saveBlob(origin, blob) {
375 return new Promise((resolve) => {
376 if (!this.isLocalStorageSupported_) {
377 resolve();
378 return;
379 }
380 this.win.localStorage.setItem(this.getKey_(origin), blob);
381 resolve();
382 });
383 }
384}
385
386/**

Callers

nothing calls this directly

Calls 3

getKey_Method · 0.95
setItemMethod · 0.80
resolveFunction · 0.50

Tested by

no test coverage detected