Browse Source
Merge pull request #12909 from abpframework/EngincanV/pwa-support-check
Check browser service worker support for app template
pull/12910/head
Enis Necipoglu
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
1 deletions
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html
|
|
|
@ -33,7 +33,11 @@ |
|
|
|
<!--/ABP:Scripts--> |
|
|
|
|
|
|
|
<!-- <TEMPLATE-REMOVE IF-NOT='PWA'> --> |
|
|
|
<script>navigator.serviceWorker.register('service-worker.js');</script> |
|
|
|
<script> |
|
|
|
if('serviceWorker' in navigator) { |
|
|
|
navigator.serviceWorker.register('service-worker.js'); |
|
|
|
} |
|
|
|
</script> |
|
|
|
<!-- </TEMPLATE-REMOVE> --> |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
|