File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,17 @@ declare global {
1818function initServiceWorker ( ) {
1919 if ( "serviceWorker" in navigator ) {
2020 window . addEventListener ( "load" , ( ) => {
21- navigator . serviceWorker . register ( "/sw.js" , { scope : "/" } ) . 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- ) ;
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+ ) ;
2932 } ) ;
3033 }
3134}
You can’t perform that action at this time.
0 commit comments