Conversation
ethanaobrien
left a comment
There was a problem hiding this comment.
I can't tell what this PR changes because you changed the indentation space count. Indentation across the entire EmulatorJS project should always be 4 spaces, to keep consistency with code style.
|
I don't even know how that happened vscode must have auto formatted it. |
|
I'm going to have to force push to fix it ug |
ethanaobrien
left a comment
There was a problem hiding this comment.
Could you provide screenshots of any UI changes and explain the logic behind this PR? I've read through the code and think its just loading the list of cores to allow the user to select what is cached locally, but I want to confirm
|
|
| urlsToCache.push(corePath + "reports/" + core.value + ".json"); | ||
| urlsToCache.push(corePath + core.value + "-wasm.data"); | ||
| urlsToCache.push(corePath + core.value + "-thread-wasm.data"); | ||
| urlsToCache.push(corePath + core.value + "-legacy-wasm.data"); | ||
| urlsToCache.push(corePath + core.value + "-thread-legacy-wasm.data"); |
There was a problem hiding this comment.
There should be some sort of opt-in here. This is 4x the amount of needed storage to keep a core locally. A user isn't often going to be switching between these at all
| const cache = await caches.open(CACHE_NAME); | ||
| if (requestURL.hostname === "cdn.emulatorjs.org" && !OFFLINE_FILES.includes(event.request.url)) { | ||
| const cachedResponse = await caches.match(event.request); | ||
| if (cachedResponse) { |
There was a problem hiding this comment.
At what point in the code is this cache updated?


No description provided.