feat: implement Web Cache API (#15829)

This commit is contained in:
Satya Rohith 2022-09-28 17:41:12 +05:30 committed by GitHub
parent 1156f726a9
commit b312279e58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 1632 additions and 6 deletions

View file

@ -50,6 +50,7 @@ delete Intl.v8BreakIterator;
const encoding = window.__bootstrap.encoding;
const colors = window.__bootstrap.colors;
const Console = window.__bootstrap.console.Console;
const caches = window.__bootstrap.caches;
const inspectArgs = window.__bootstrap.console.inspectArgs;
const quoteString = window.__bootstrap.console.quoteString;
const compression = window.__bootstrap.compression;
@ -469,6 +470,13 @@ delete Intl.v8BreakIterator;
btoa: util.writable(base64.btoa),
clearInterval: util.writable(timers.clearInterval),
clearTimeout: util.writable(timers.clearTimeout),
caches: {
enumerable: true,
configurable: true,
get: caches.cacheStorage,
},
CacheStorage: util.nonEnumerable(caches.CacheStorage),
Cache: util.nonEnumerable(caches.Cache),
console: util.nonEnumerable(
new Console((msg, level) => core.print(msg, level > 1)),
),