From b312279e58e51520a38e51cca317a09cdadd7cb4 Mon Sep 17 00:00:00 2001 From: Satya Rohith Date: Wed, 28 Sep 2022 17:41:12 +0530 Subject: feat: implement Web Cache API (#15829) --- runtime/js/99_main.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'runtime/js') diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 755eac939..0a65cadee 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -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)), ), -- cgit v1.2.3