File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
- var cacheName = 'egui-template -pwa' ;
1
+ var cacheName = "particle-simulation -pwa" ;
2
2
var filesToCache = [
3
- './' ,
4
- ' ./index.html' ,
5
- ' ./particle-simulation.js' ,
6
- ' ./particle-simulation_bg.wasm' ,
3
+ "./" ,
4
+ " ./index.html" ,
5
+ " ./particle-simulation.js" ,
6
+ " ./particle-simulation_bg.wasm" ,
7
7
] ;
8
8
9
9
/* Start the service worker and cache all of the app's content */
10
- self . addEventListener ( ' install' , function ( e ) {
10
+ self . addEventListener ( " install" , function ( e ) {
11
11
e . waitUntil (
12
12
caches . open ( cacheName ) . then ( function ( cache ) {
13
13
return cache . addAll ( filesToCache ) ;
14
- } )
14
+ } ) ,
15
15
) ;
16
16
} ) ;
17
17
18
18
/* Serve cached content when offline */
19
- self . addEventListener ( ' fetch' , function ( e ) {
19
+ self . addEventListener ( " fetch" , function ( e ) {
20
20
e . respondWith (
21
21
caches . match ( e . request ) . then ( function ( response ) {
22
22
return response || fetch ( e . request ) ;
23
- } )
23
+ } ) ,
24
24
) ;
25
25
} ) ;
You can’t perform that action at this time.
0 commit comments