File tree 2 files changed +9
-17
lines changed
2 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,14 @@ declare global {
18
18
function initServiceWorker ( ) {
19
19
if ( "serviceWorker" in navigator ) {
20
20
window . addEventListener ( "load" , ( ) => {
21
- navigator . serviceWorker
22
- // TODO: base url is required here. Hardcode for testing purposes.
23
- . register ( "/service-worker/sw.js" , { scope : "/service-worker/" } )
24
- . then (
25
- function ( _registration ) {
26
- console . log ( "Simulator ServiceWorker registration successful" ) ;
27
- } ,
28
- function ( err ) {
29
- console . log ( "Simulator ServiceWorker registration failed: " , err ) ;
30
- }
31
- ) ;
21
+ navigator . serviceWorker . register ( "sw.js" ) . then (
22
+ function ( _registration ) {
23
+ console . log ( "Simulator ServiceWorker registration successful" ) ;
24
+ } ,
25
+ function ( err ) {
26
+ console . log ( "Simulator ServiceWorker registration failed: " , err ) ;
27
+ }
28
+ ) ;
32
29
} ) ;
33
30
}
34
31
}
Original file line number Diff line number Diff line change 1
1
function initSimulatorServiceWorker ( ) {
2
- const simUrls = [
3
- // TODO: Fix more prefix hacks
4
- "/service-worker/simulator.html" ,
5
- "/service-worker/build/simulator.js" ,
6
- "/service-worker/build/firmware.js" ,
7
- ] ;
2
+ const simUrls = [ "simulator.html" , "build/simulator.js" , "build/firmware.js" ] ;
8
3
let didInstall = false ;
9
4
const cacheName = "simulator" ;
10
5
You can’t perform that action at this time.
0 commit comments